I am making a text box to show how many calories are missing when you cant buy something, but it doesnt change the text, BUT in the propreties it does for some reason
heres what the propreties and the buttons look like
Yeah, your changing the text in Starter Gui, not in the gui of the player.
Use a local script like:
local player = game.Players.LocalPlayer
local gui = player.PlayerGui:FindFirstChild("yourguiname")
if gui then
gui.(ur location of the text).Text = ecc
end
no i am not, i think, here is one of the scripts i use to update it if it helps
local player = game.Players.LocalPlayer
local gui = player.PlayerGui:FindFirstChild("Text")
local info = gui:FindFirstChild("Missing")
local function onClick()
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local calories = player:WaitForChild("leaderstats").CaloriesBurned.Value
local UP1 = player:WaitForChild("Hidden").UP1.Value
local requiredCalories = {
--a table here
if requiredCalories[UP1] then
if calories >= requiredCalories[UP1] then
calories = calories - requiredCalories[UP1]
if UP1 == 13 or UP1 == 25 or UP1 == 30 or UP1 == 35 then
UP1 += 5
elseif UP1 == 14 or UP1 == 19 then
UP1 += 3
else
UP1 += 1
end
else
--make this change info's text to show how many calories you need to upgrade
info.Text = "Missing " .. requiredCalories[UP1] - calories .. " calories"
end
elseif UP1 == 40 then
info.Text = "Max Upgrade"
end
game.ReplicatedStorage.Values:FireServer(player.leaderstats.CaloriesBurned, calories)
game.ReplicatedStorage.Values:FireServer(player.Hidden.UP1, UP1)
end
script.Parent.MouseButton1Click:Connect(onClick)