I am putting a "Riddle Code" into my place. Basically, if the user puts the right code in the txt box and presses ENTER, and they haven't placed the code before, they get 200 points.
function onClicked(player) local player = game.Players.LocalPlayer if script.Parent.Parent.TextBox.Text == "bloxvortex" then if player.riddlecodetrue == 0 then player.leaderstats.Points.Value = player.leaderstats.Points.Value + 200 script.Parent.Parent.TextBox.Text = "The Answer was Correct! +200 Points!" player.riddlecodetrue = 1 end else script.Parent.Parent.TextBox.Text = "The Answer was Already Entered." end end script.Parent.MouseButton1Click:connect(onClicked)
The issue is the fact that riddlecodetrue isn't a valid property of player objects - I do believe you're intending to edit the value of a value object named "riddlecodetrue", therefore you need to change:
player.riddlecodetrue
To:
player.riddlecodetrue.Value