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

TextBox not working in Online mode?

Asked by 10 years ago
local player = game.Players.LocalPlayer

script.Parent.FocusLost:connect(function(enterPressed)
    if enterPressed and script.Parent.Text == "U48f294Gq" and player.Code1.Value == false then
        script.Parent.Text = "Giving Reward"
        player.Points.Value = player.Points.Value + 2000
        player.Code1.Value = true
        wait(3)
        script.Parent.Text = "Code Here....."
    elseif enterPressed and script.Parent.Text ~= "U48f294Gq" then
        script.Parent.Text = "Incorrect Passcode"
        wait(3)
        script.Parent.Text = "Code Here....."
    elseif enterPressed and script.Parent.Text == "U48f294Gq" and player.Code1.Value == true then
        script.Parent.Text = "Already entered Code"
        wait(3)
        script.Parent.Text = "Code Here....."
    end
end)

This works in studio with Start Server. But when I play on an online server it says "Code already entered" even though I havent entered online yet. It is a localscript inside the TextBox. Anyone know?

0
Nothing LOOKS wrong. Check the console in online (F9 key) and give us any errors that are in it pertaining to this code. If there's no error, then it's a logic error. Tkdriverx 514 — 10y
0
nope nothing. if you enter some random thing it works saying that its incorrect but when you enter the actual code it says you have already enter that code? NinjoOnline 1146 — 10y

Answer this question