Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Local Script that changes text in billboard gui doesn't run or work!?

So I have this local script in my game its in StarterPlayerScripts and its supposed to change a billboards text when a value is changed but it doesnt do it help! Oh and by the way, it's local cause I want each players screen to be different so you cant help people on regular npc battles but on boss battles you can so you can invite people there.

Local Script

local npc = game.Workspace["Farmer Bill"]
local head = npc.Head
local billboard = head:WaitForChild('BillboardGui')
local label = billboard:WaitForChild("TextLabel")
local soldiers = npc.Soldiers


soldiers.Changed:Connect(function()
	print("changed")
	label.Text = "Farmer Bill: "..soldiers.Value.."  Soldiers(Noob Difficulity)"
end)

2 comments

0

Could you define what 'Soldiers' are(is)?

0

A value indicating the npc's troops

1 answer

✓ Accepted answer

I tried out this code, and it certainly works. I suggest checking that either:

A. The Billboard Gui's Enabled Property is set to true,

B. The TextLabel's Visible Property is set to true.

C. The Script is somewhere inside "StarterGui"

The "soldiers" should be a StringValue, IntValue, or NumValue for this to work.

1 comment

0

Oh you're right! I accidently putted my script in StarterPlayer.

This discussion is preserved as it was. New answers, comments, and votes are closed.