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
local player = game.Players.LocalPlayer
script.Parent.FocusLost:Connect(function()
game.ReplicatedStorage.RemoteEvent:FireServer(player, tonumber(script.Parent.Text))
end)
SCRIPT
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, text)
print(player, text)
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

1 comment
You don't need to send the player yourself, Roblox does that for you. So just do: FireServer(Text);