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

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

Asked by 5 years ago

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)
0
Could you define what 'Soldiers' are(is)? Ziffixture 6913 — 5y
0
A value indicating the npc's troops MahadTheIronSword 98 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

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.

0
Oh you're right! I accidently putted my script in StarterPlayer. MahadTheIronSword 98 — 5y
Ad

Answer this question