:I'm trying to make a text label that shows one of the player's statistics, but the frame will be visible to multiple people at a time, so how would I use a local script to make it show the stat of the local player? I tried using my own script and it didn't change the text at all, here's the script I used:
local lplayer = game.Players.LocalPlayer local stats = lplayer.PlayerPackage.Stats local puzzlepiece = stats.PuzzlePieces.Zombie -- These are for defining the statistic while true do wait(0.01) script.Parent.Text = (' '..puzzlepiece.Value..' out of 30 ') -- This is for changing the text end
:I didn't get any error codes in the output window when I ran the script, but did I somehow use the Local Script incorrectly? Are there any errors in my code that I haven't noticed?
No issues with the loop or code. That narrows it down. Is the local script in the wrong place? Scripts will not execute in ReplicatedStorage or Server Storage. The other issue could be that "lplayer.PlayerPackage.Stats.PuzzlePieces.Zombie.Value" is not updating. That would mean that the value of "Zombie" is not being changed.