Hello,
This is a really common error but it’s different for everyone so I am asking for help
Roblox is being super dumb right now and Is acting like my “PlayerStats” BillboardGui just doesn’t exist when it clearly does
im getting the “Attempt to index nil” B.S. in the output.
Please help.
6 Likes
ronaldbox
(Ronaarudo)
August 29, 2023, 10:00pm
#2
Are you accessing the stats for a server script or local script?
3 Likes
I am using a server script
//////////
2 Likes
ronaldbox
(Ronaarudo)
August 29, 2023, 10:02pm
#4
Have you tried putting the UI in ReplicatedStorage
2 Likes
Same error, sadly. (im getting “infinite yield” because of the waitforchild)
1 Like
ronaldbox
(Ronaarudo)
August 29, 2023, 10:05pm
#6
Are those 2 items shown in the picture the onlly items in server storage?
1 Like
Yes, they are the only items in server storage
1 Like
ronaldbox
(Ronaarudo)
August 29, 2023, 10:10pm
#8
Check if the error is still there in runtime
1 Like
Youf_Dev
(Youf_Dev)
August 29, 2023, 10:10pm
#9
use :GetService()
maybe:
local nameTag = game:GetService("ServerStorage"):WaitForChild("PlayerStats")
also, are you sure it’s a ServerScript? if yes than make sure there’s no script that removes it from the ServerStorage.
1 Like
ronaldbox
(Ronaarudo)
August 29, 2023, 10:11pm
#10
Im guessing, the UI goes under the player on spawn, make sure the UI is cloned before parenting.
1 Like
Still the same error
this is the first line of the script, so the UI has not been cloned nor parented to the player
1 Like
ronaldbox
(Ronaarudo)
August 29, 2023, 10:16pm
#12
go into play > run and check if the ui is still there
2 Likes
Youf_Dev
(Youf_Dev)
August 29, 2023, 10:17pm
#13
Where is the script with this line located? Could you screenshot the whole error in the output? thanks
1 Like
ronaldbox
(Ronaarudo)
August 29, 2023, 10:17pm
#14
Can you also show pic of the actual output message
1 Like
ronaldbox
(Ronaarudo)
August 29, 2023, 10:19pm
#16
You sure there is no script moving or deleting the ui?
is archivable on
2 Likes
Archivable is off, and there is no script (that I know of) that is deleting it
1 Like
ronaldbox
(Ronaarudo)
August 29, 2023, 10:21pm
#18
turn it on and test if its still not there
1 Like
The UI is still not there
////
1 Like
Youf_Dev
(Youf_Dev)
August 29, 2023, 10:22pm
#20
go in studio and press the following keys: Shift + Control + F. It will open a tab to research specific code in all the scripts in your game. Now try playing with the words and do for example:
ServerStorage:WaitForChild("PlayerStats"):Destroy()
ServerStorage:WaitForChild("PlayerStats"):Remove()
ServerStorage.PlayerStats:Destroy()
ServerStorage.PlayerStats:Remove()
2 Likes