#[SOLVED] Unable to tonumber() a TextBox's Text
1 messages · Page 1 of 1 (latest)
are you sure you get the input you write in
i mean try printing game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("GiveMeMyTool"):WaitForChild("ToolIDShow").Text
first write an id there
i did
then run print(game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("GiveMeMyTool"):WaitForChild("ToolIDShow").Text) in local console
130113146
then are you sure ToolIDShow is the right text box you are using
is this the output
yeah
only when i run this in the command bar at the bottom
i think i got the problem
is it because the server sees it as an empty string?
you are firing a replicated event at local script and giving the player who fires it
you dont need to do it
while client to server firing
you get this unable to cast instance to int64 cuz it its not doing the id its doing the player
no no i dont mean that
game:GetService("ReplicatedStorage"):WaitForChild("GiveGear"):FireServer(tonumber(game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("GiveMeMyTool"):WaitForChild("ToolIDShow").Text))
use this in lpcal script
yw
you can see here when you fired a event in local it comes to server with who fired it and this argument it fired with
[SOLVED] Unable to tonumber() a TextBox's Text
you did RemoteEvent:FireServer(arg,arg)
and server gotten RemoteEvvent.OnserverEvent:Connect(function(player,arg,arg))
ohhhh im so dumb
and you have taken the second arg here as id
but it was the player