How can I get text on a BillBoard Gui to show from a local script?

Everything from my script is working apart from changing the text just for the client. I have found text in workspace but I’m not sure how I can make this text only show locally for the player.

local Players = game:GetService("Players")

local text = game.Workspace.Lobby_Obby.ClaimTextTime.BillboardGui.TextLabel.Text
local player = Players.LocalPlayer
local LastClaimedTime = player:WaitForChild("LastClaimedTime")

while true do 
	task.wait(1)
	local currentTime = os.difftime(os.time(), LastClaimedTime.Value)
	print(currentTime)
	if currentTime >= 18000 then 
		text = "00: 00: 00"
	else 
		local hours = math.floor(currentTime / 3600)
		print(hours.. "Hours")
		local minutes = math.floor((currentTime - (hours * 3600)) / 60)
		print(minutes.. "Minutes")
		local seconds = math.floor(currentTime - (minutes * 60))
		print(seconds.. "Seconds")
		text = ((8 - hours + 1)..": "..(60 - minutes)..": "..(60 - seconds))
	end
end

Any help would be appreciated. This local script is in starterPlayer scripts

Is the script in a localscript or severscript?

1 Like

My title says local script but yeah it’s a local script

You are changing the text variable and not the text on the TextLabel. At first you are assigning text written inside the TextLabel to the text variable then you are just changing the variable which does nothing. Instead you have to assign the TextLabel instance to the text variable (by just removing .Text from the variable) and when you want to change the text you need to write it as text.Text = ...

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.