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?

2 comments
Im not so sure cause im new but i think instead of hurt it should mean something that kills the player or takes out health points??
oh yeah