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

My text changer won't work for my mining game, why?

Asked by 5 years ago

I have a backpack script which indicates how many ores you have in a mining game. The CurrentValue's value changes, but the text on the TextLabel doesn't record what the CurrentValue's value is, along with the MaxValue's value.

Here's my code:

local player = game.Players.LocalPlayer

local playergui = player.PlayerGui.Backpack

local title = playergui.Title



local max = playergui.MaxAmount

local current = max.Parent.CurrentAmount



local remote = game.ReplicatedStorage.Events.AddBlocks



title.Text = current.Value.."/"..max.Value



title:GetPropertyChangedSignal("Text"):Connect(function()

title.Text = current.Value.."/"..max.Value

end)



remote.OnClientEvent:Connect(function(drop)

current.Value = current.Value + drop.Value

end)

Any help would be appreciated

0
Remote functions / events require a local script and a server script, do you have both? MegaManSam1 207 — 5y
0
yes toman655 58 — 5y

Answer this question