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

How do I change the Textlabel to the Value of my NumberValue?

Asked by
Cowgato 33
2 years ago
Edited 2 years ago
1--AmountOfOrbs is a NumberValue in workspace--
2 
3script.Parent.Touched:Connect(function(hit)
4    game.Workspace.AmountOfOrbs.Value +=1
5    game.StarterGui.ScreenGui.TextLabel.Text == game.Workspace.AmountOfOrbs.Value
6    script.Parent:Destroy()
7end)
0
You're using a comparative equal to operator (==) when you should be using an assignment operator (=) ScriptGuider 5640 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
1script.Parent.Touched:Connect(function(hit)
2    game.Workspace.AmountOfOrbs.Value +=1
3    game.StarterGui.ScreenGui.TextLabel.Text = game.Workspace.AmountOfOrbs.Value
4    print("Bruh")
5    script.Parent:Destroy()
6end)
Ad

Answer this question