#[SOLVED] Unable to tonumber() a TextBox's Text

1 messages · Page 1 of 1 (latest)

simple jetty
#

this is only some parts of the script, not the full ones

winter sapphire
#

are you sure you get the input you write in

#

i mean try printing game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("GiveMeMyTool"):WaitForChild("ToolIDShow").Text

simple jetty
#

wth

#

attempted to index nil

winter sapphire
#

first write an id there

simple jetty
#

i did

winter sapphire
#

then run print(game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("GiveMeMyTool"):WaitForChild("ToolIDShow").Text) in local console

simple jetty
#

130113146

winter sapphire
#

then are you sure ToolIDShow is the right text box you are using

winter sapphire
simple jetty
#

yeah

simple jetty
winter sapphire
#

i think i got the problem

simple jetty
#

is it because the server sees it as an empty string?

winter sapphire
#

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

simple jetty
#

if i give the player the tool from the local script

#

no one else will see the tool

winter sapphire
#

you get this unable to cast instance to int64 cuz it its not doing the id its doing the player

winter sapphire
#

game:GetService("ReplicatedStorage"):WaitForChild("GiveGear"):FireServer(tonumber(game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("GiveMeMyTool"):WaitForChild("ToolIDShow").Text))

#

use this in lpcal script

simple jetty
#

oh shit

#

thank you so much

winter sapphire
#

yw

winter sapphire
#

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

simple jetty
#

[SOLVED] Unable to tonumber() a TextBox's Text

winter sapphire
#

you did RemoteEvent:FireServer(arg,arg)

#

and server gotten RemoteEvvent.OnserverEvent:Connect(function(player,arg,arg))

simple jetty
#

ohhhh im so dumb

winter sapphire
#

but it was the player

simple jetty
#

yes yes i understand now thank you very much

#

im closing this now