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

Code Not Working?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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)
0
What's the error? M39a9am3R 3210 — 9y
0
when I put in the answer, nothing happens. fight4moneyalt2 27 — 9y
0
Check the output and see if there is a error. M39a9am3R 3210 — 9y
0
There is no error in output. It does say " 21:37:57.501 - This function is not yet enabled!" but that has nothing to do with my script. fight4moneyalt2 27 — 9y
View all comments (3 more)
0
And yes, its a localscript. fight4moneyalt2 27 — 9y
0
That's from an admin script. HungryJaffer 1246 — 9y
0
? fight4moneyalt2 27 — 9y

1 answer

Log in to vote
0
Answered by
DataStore 530 Moderation Voter
9 years ago

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 
0
(I like your username). And thanks. I make this problem every time. :D fight4moneyalt2 27 — 9y
Ad

Answer this question