This server script is not working for me and i dontknow why, i need the player data and the player here
01 | local rep = game.ReplicatedStorage |
02 | local events = rep.Events |
03 | local event = events.event |
04 |
05 | --Event calling |
06 | event.OnServerEvent:connect( function (player.data) |
07 | if data.reason = = "changeTeam" then |
08 | player.Team = data.team |
09 | end |
10 | end ) |
This error is explaining that it expected a )
to close the function(player.data)
but instead got .
meaning that the syntax is incorrect.
Replace the .
with ,
as this is the separator used when defining parameters.
Example
1 | event.OnServerEvent:connect( function (player, data) |
2 | -- code |
3 | end ) |
hope this helps.