How to send a tool name to server from client? (Remote Events)
Basically once the reward gui is done i want the client to send the tool name to the server then the server will pick it up and give the player the tool
Client
01 | game.ReplicatedStorage.tool.Changed:Connect( function () |
03 | gui.SCPONE.Visible = true |
05 | gui.SCPONE.clear.Visible = true |
07 | gui.SCPONE.Frame.ImageLabel.Visible = true |
09 | gui.SCPONE.Visible = false |
10 | game.ReplicatedStorage.tool:FireServer(g) |
Server
1 | game.ReplicatedStorage.tool.OnServerEvent:Connect( function (player,g,h) |
3 | print ( "its g time to give a tool named g" ) game.ReplicatedStorage.g.Parent = player |
6 | print ( "its h time to give a tool named h" ) game.ReplicatedStorage.h.Parent = player |