one thing id like to say is ive gotten so many of those “attempt to index nil with” garbage errors yesterday, but a wait(5) usually seemed to fix it. you dont have to, its just a suggestion
This script is the only mention of server storage
the problem here isn’t that the game hasn’t been loaded yet. As previously seen on the screenshot, the BillboardGui dissapears whenever he joins the game so there must be something going on with the scripts.
oh my bad sorry
eeeeeeeeeeeeee
Instead of putting it inside of the ServerStorage, maybe put it directly into the “NameTagScript”.
change the line with the following:
local nameTag = script:WaitForChild("PlayerStats")
local nameTag = game:GetService("ServerStorage"):WaitForChild("PlayerStats")
game.Players.PlayerAdded:Connect(function(plr)
repeat task.wait() until plr.CharacterAdded
workspace:WaitForChild(plr.Name).Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
local nameTagClone = nameTag:Clone()
nameTagClone.Frame.Name.Text = plr.Name
nameTagClone.Parent = workspace[plr.Name].Head
end)
entire script
Tried that and it didn’t work.
I mean you can try shifting the code around i guess
game.Players.PlayerAdded:Connect(function(plr)
repeat task.wait() until plr.CharacterAdded
workspace:WaitForChild(plr.Name).Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
local nameTagClone = game:GetService("ServerStorage"):WaitForChild("PlayerStats"):Clone()
nameTagClone.Frame.Name.Text = plr.Name
nameTagClone.Parent = workspace[plr.Name].Head
end)
game.Players.PlayerAdded:Connect(function(plr)
repeat task.wait() until plr.CharacterAdded
workspace:WaitForChild(plr.Name).Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
local nameTagClone = game:GetService("ServerStorage"):WaitForChild("PlayerStats"):Clone()
nameTagClone.Frame.Name.Text = plr.Name
nameTagClone.Parent = workspace[plr.Name].Head
end)
That was actually my first iteration of the code and that wasn’t working so I switched it around
that was a funny coincidence lol
indeed lol lllllllllllllllllllllllllll
do the search method i showed you before and look for scripts that use :Destroy
or :Remove
I just tested in my own studio with no errors, something is clearly changing the UI.
No scripts are using those functions
try making a backup and naming it backupnametag or something
You sure you turned on archivable?
It should be turned on for the UI Object
I got an error only when i turned it off.
also this doesn’t seem correct. This is better;
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
char.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
local nameTagClone = game:GetService("ServerStorage"):WaitForChild("PlayerStats"):Clone()
nameTagClone.Frame.Name.Text = plr.Name
nameTagClone.Parent = char:WaitForChild("Head")
end)
end)
I had no idea archivable had to be on.
I also didn’t know what it does
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.