of     1   

XGodOfGods
#218177640Sunday, June 04, 2017 10:42 PM GMT

How do i make it so that when a sphere(goro), touches a humanoid, it causes them to take 3 damage? i tried goro.Touched:connect(function(hit) if hit.Parent == humanoid then hit:TakeDamage(3) but it won't work for some reason. Any ideas? player = game.Players.LocalPlayer character = player.CharacterAdded:wait() humanoid = character:WaitForChild('Humanoid') mouse = player:GetMouse() local Ready = false goroBall = Instance.new("Part", game.Workspace) goroBall.Shape = "Ball" goroBall.CanCollide = false goroBall.Material = "Neon" goroBall.BrickColor = BrickColor.new("Light blue") goroBall.Size = Vector3.new(25,25,25) uis = game:GetService("UserInputService") uis.InputBegan:connect(function(input,gpe) if input.KeyCode == Enum.KeyCode.Z and Ready == false then Ready = true for i = 1,8 do wait(0.2) local goro = goroBall:Clone() goro.Parent = game.Workspace goro.CFrame = character.Torso.CFrame * CFrame.new(0,0,-15) local bv = Instance.new("BodyVelocity") bv.MaxForce = Ve######################## bv.Velocity = character.Torso.CFrame.lookVector*100 bv.Parent = goro uis.InputEnded:connect(function(code) if code.KeyCode == Enum.KeyCode.Z then wait(5) Ready = false wait() goro:Destroy() end end) end end end)
BunnyBoy26
#218178479Sunday, June 04, 2017 10:55 PM GMT

You need: hit.Parent:FindFirstChild("Humanoid")
szkiller
#218179764Sunday, June 04, 2017 11:14 PM GMT

Humanoid = hit.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid:TakeDamage(3)
09118
#218181458Sunday, June 04, 2017 11:40 PM GMT

so goro.Touched:connect(function(hit) local Humanoid = hit.Parent:FindFirstChild("Humanoid") if Humanoid ~= then Humanoid:TakeDamage(3) end) ?
09118
#218181514Sunday, June 04, 2017 11:41 PM GMT

lol sorry i needed a script like the one Xgod needs too, just looking
XGodOfGods
#218181975Sunday, June 04, 2017 11:47 PM GMT

@09118 np, and also should i put the touched before or after InputEnded?

    of     1