CLOSED, I SOLVED IT MYSELF!
Hello, Devs!
So I was trying to make TextBox that if you will put any number in it, it will print the number on the server, not on client. I tried using RemoteEvents and parameters for FireServer:() and OnServerEvent, but it printed out only player username that put the number in output. Thanks in advice.
CODE:
LOCAL SCRIPT
1 | local player = game.Players.LocalPlayer |
2 |
3 | script.Parent.FocusLost:Connect( function () |
4 | game.ReplicatedStorage.RemoteEvent:FireServer(player, tonumber (script.Parent.Text)) |
5 | end ) |
SCRIPT
1 | game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect( function (player, text) |
2 | print (player, text) |
3 | end ) |
OUTPUT:
No errors
ErktikyYT ErktikyYT
Server
DETAILS:
Local script located in textbox, textbox located in ScreenGui script located in workspace remote event located in ReplicatedStorage
I am suggesting you to check https://developer.roblox.com/en-us/api-reference/function/RemoteEvent/FireServer