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

Can anyone fix this easy GUI Button script?

Asked by 10 years ago

this isn't working:

strength = script.Parent.TextBox
script.Parent.MouseButton1Down:connect(function() 
    strength.text = math.random(1,10)
end)

thanks, rep points for all contributors

3 answers

Log in to vote
0
Answered by 10 years ago
strength = script.Parent.TextBox
script.Parent.MouseButton1Down:connect(function() 
    strength.Text = math.random(1,10)
end)

Capatilized T

Make sure to rate this answer up and accept the answer for others

0
Why do people downvote the right answer? Nutcases NinjoOnline 1146 — 10y
Ad
Log in to vote
3
Answered by
c0des 207 Moderation Voter
10 years ago
strength = script.Parent.TextBox
script.Parent.MouseButton1Down:connect(function()
    strength.Text = math.random(1,10)
end)
0
Copied from mine NinjoOnline 1146 — 10y
Log in to vote
2
Answered by
Vathriel 510 Moderation Voter
10 years ago

The t in Text must be capitalized on line 3.

Answer this question