Help With Error Fixing

Hello. I am currently getting an error that I seem to not be able to fix.

The error is:
Workspace.Script:6: Expected ‘end’ (to close ‘function’ at line 1), got ; did you forget to close ‘then’ at line 3?

My code is:
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if msg:find(“test”) then
player:Kick(“yoink”)
end
end
end)

It is in a server script in workspace.

Thanks,
Ben

1 Like