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

The value won't change but the text will?

Asked by
Ieowyyn 69
5 years ago
Edited 5 years ago
01--|| Variables ||--
02local Vote2Button = script.Parent.butt
03local Vote1Button = script.Parent.on
04local Vote2Text = script.Parent.oof
05local Vote1Text = script.Parent.poof
06 
07--|| Script ||--
08Vote1Text.Value.Changed:Connect(function()
09    Vote1Text.Text = Vote1Text.Value.Value
10end)
11 
12Vote2Text.Value.Changed:Connect(function()
13    Vote2Text.Text = Vote2Text.Value.Value
14end)
15 
View all 22 lines...

So this script is supposed to be a voting system, the Text of "oof" and "poof" would change but their values wouldn't because of this problem the Text can't add anymore it stays at 1.

1 answer

Log in to vote
0
Answered by 5 years ago

You are just Setting the Text to the Value + 1. I would do this:

01--|| Variables ||--
02local Vote2Button = script.Parent.butt
03local Vote1Button = script.Parent.on
04local Vote2Text = script.Parent.oof
05local Vote1Text = script.Parent.poof
06 
07--|| Script ||--
08Vote1Text.Value.Changed:Connect(function()
09    Vote1Text.Text = Vote1Text.Value.Value
10end)
11 
12Vote2Text.Value.Changed:Connect(function()
13    Vote2Text.Text = Vote2Text.Value.Value
14end)
15 
View all 24 lines...
0
Ah okay, thanks. Ieowyyn 69 — 5y
Ad

Answer this question