Hello.
I have encountered this multiple times, but I encountered it again last night and I have to ask.
So, when I use FireServer()
, and I want to do something, for example, make a tool choice GUI, I like to define what player fired.
I tried doing this last night with this function:
print(player.Name..”’s choices:“..choiceOne, choiceTwo, choiceThree, “ | end”)
end)```
And it printed this:
```MaximussDev’s choices:“ Tool OneTool TwoTool Three| end```
You don’t need to include the player argument for :FireServer, it automatically is received as the first parameter.
Ex:
-- LocalScript
remote:FireServer(arg1, arg2)
-- ServerScript
remote.OnServerEvent:Connect(function(player, arg1, arg2)
-- handle
end)
1 Like
Oh, so it automatically defines the player argument when you fire?
1 Like
Yes, it does.
[Need to reach 30 characters]
1 Like
sjr04
(uep)
July 9, 2019, 8:08pm
#5
Yes roblox does this implicitly
1 Like
Oh OK. Thanks guys! This really helps!
1 Like
If Roblox did not provide the player who fired the event, that would allow exploiters to act as another player. This is one of those major security solutions allowing developers to protect their game against exploiters.
2 Likes