ServerScriptService.ServerScriptService:17: Expected ')' (to close '(' at line 7), got 'end
game.ReplicatedStorage.Events.Ice.OnServerEvent:Connect(function(player, part, mousePos)
if part == "Replicate" then
game.ReplicatedStorage.Events.Ice:FireAllClients(player, mousePos) --Tell every client the skill has been casted
elseif part.Parent:FindFirstChild("Humanoid") then
part.Parent:FindFirstChild("Humanoid"):TakeDamage(20)
script.Parent.Touched:Connect(function(hit)
script.Parent.Touched:connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.WalkSpeed = 0
wait(2)
humanoid.WalkSpeed = 16
end)
end
end
end)
Thank you for reading please tell me what I'm doing wrong sorry I'm a beginner scripter

2 comments
I will try to help but if I was you organize your code better cause its a pain to look through
I got the script of a tutorial im editing it so it freezes the player when the iceball hits the player also thank you alot for helping