I was scripting a small wave that comes out of the players hand, but the actual wave doesn't detect when it hits a player, though I used the get player service and touched connect.
local Water = script.Parent local function hurt(other) local parent = other.Parent if game.Players:GetPlayerFromCharacter(parent) then parent.Humanoid.WalkSpeed = 10 wait(.8) parent.Humanoid.WalkSpeed = 16 wait(.8) Water:Destroy() end Water.Touched:Connect(hurt) end
Anyone know what's wrong?
Ok i dont know what you want or wher this is, but hers what i would do: (normalscript)
Water.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid") then --i do hit.parent.parent in case it is a hat thats touched, or if hats dont count then take it out hit.Parent.Humanoid.WalkSpeed = 10 end end)
and omg what is up with your code!? I understand but still im looking at it like https://youtu.be/ua-3T12Um7U?t=349 I mean, You do NOT need getplayerfromchracter player from other.parent and that stuff!