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
You forgot one end) Fixed it for ya think I fixed it if not Just comment on this
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) end)
I see your problem. You forgot to put an ) on line 15, like this:
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)
Hope this helped!