Ad
Log in to vote
0

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

Asked by
Cowgato 33
20 days ago
Edited 20 days ago
--AmountOfOrbs is a NumberValue in workspace--

script.Parent.Touched:Connect(function(hit)
    game.Workspace.AmountOfOrbs.Value +=1
    game.StarterGui.ScreenGui.TextLabel.Text == game.Workspace.AmountOfOrbs.Value
    script.Parent:Destroy()
end)
0
You're using a comparative equal to operator (==) when you should be using an assignment operator (=) ScriptGuider 5579 — 20d

1 answer

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

Answer this question