Como fazer um script de dano no estúdio Roblox
local rarm = script.Parent:FindFirstChild("head")
local rarm = script.parent:FindFirstChild("torso)
Wide-eyed Whale
local rarm = script.Parent:FindFirstChild("head")
local rarm = script.parent:FindFirstChild("torso)
local rarm = script.Parent:FindFirstChild("Right Arm")
local larm = script.Parent:FindFirstChild("Left Arm")
function dmg(hit)
if hit.Parent ~= nil then
local hum = hit.Parent:findFirstChild("Humanoid")
if hum ~= nil then
hum.Health = hum.Health -10
end
end
end
rarm.Touched:connect(dmg)
larm.Touched:connect(dmg)
local rarm = script.Parent:FindFirstChild("head")
local larm = script.Parent:FindFirstChild("torso")
function dmg(hit)
if hit.Parent ~= nil then
local hum = hit.Parent:findFirstChild("Humanoid")
if hum ~= nil then
hum.Health = hum.Health -10
end
end
end
rarm.Touched:connect(dmg)
larm.Touched:connect(dmg)