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

Screen GUI Label Text Help?

Asked by 5 years ago
Edited 5 years ago

Script goes fine, but when player resets or respawns the value goes back to 0. Any help or suggestions?

[Local Script in screen GUI inside text label]

local player = game.Players.LocalPlayer
local crops = player.Inventory:WaitForChild("Crops")

crops:GetPropertyChangedSignal("Value"):Connect(function()
    script.Parent.Text = crops.Value
end)

2 answers

Log in to vote
1
Answered by
Lakodex 711 Moderation Voter
5 years ago

This is actually not a script problem. Do these instructions

Click on the ScreenGUI and unclick ResetOnSpawn. Simple

0
I agree TheRealPotatoChips 793 — 5y
0
Thanks User#29320 0 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

Maybe a while true do loop

local player = game.Player
local crops = player.Inventory:WaitForChild("Crops")


function Update()
    script.Parent.Text = crops.Value
end


while true do
    Update()
end





0
You Tried. Lakodex 711 — 5y
0
im new to scripting User#22145 0 — 5y
0
No hate man. I was to, Lets get hooked up and I'll teach you. Here's my discord : Devamspion#7812 Lakodex 711 — 5y
0
Dosent Work User#22145 0 — 5y
0
Omg, i really did this lol. Im laughing at how bad this is User#22145 0 — 4y

Answer this question