Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

--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)

1 comment

0

You're using a comparative equal to operator (==) when you should be using an assignment operator (=)

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.