Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

this script only works when player resets?

Asked by
mehssi 20
8 years ago
local player = game.Players.LocalPlayer
StarterGui = player.PlayerGui
repeat wait()until player.Character
local Torso = player.Character.Torso
local BackGui = Instance.new("SurfaceGui",Torso)
BackGui.Face = "Back"
BackGui.CanvasSize = Vector2.new(100,100)
local NameDisplay = Instance.new("TextLabel",BackGui)
NameDisplay.Size = UDim2.new(0.6,0,0.6,0)
NameDisplay.Position = UDim2.new(0.21,0,0.28,0)
NameDisplay.BackgroundTransparency = 1
NameDisplay.FontSize = 5
NameDisplay.TextStrokeTransparency= 0
NameDisplay.Text = player.hiddenstats.Jersey.Value
NameDisplay.TextColor3=Color3.new(1,1,1)
NameDisplay.TextScaled = true
NameDisplay.TextWrapped = true

player.hiddenstats.Jersey.Changed:connect(function()
    NameDisplay.Text = player.hiddenstats.Jersey.Value
end)

please help, if a new player joins it will just say "Label", it won't show the value until he resets

0
chanee the way you did it to a playeradded function. The script should be a script, not a localscript, inside workspace TheDeadlyPanther 2460 — 8y
0
This uses LocalPlayer so it is a LocalScript. Scripts don't go in workspace. This doesn't use PlayerAdded. 1waffle1 2908 — 8y

Answer this question