I have a free modeled password script. (I was to lazy to make one. Its for a game I am making just for my friends) Line 15 is my script I put in to make my skin color change GUI show up. Here is script ~~~~~~~~~~~~~~~~~
local box = script.Parent.Parent:WaitForChild('TextBox') local button = script.Parent local code = 'p0tat0' local tries = 0 local maxtries = 3 button.MouseButton1Click:connect(function() if tries == maxtries then game.Players.LocalPlayer:Kick() else
if box.Text == code then button.Text = 'Password accepted - loading game' wait(2) script.Parent.Parent.Parent:Destroy() script.Parent.Parent.Parent.Parent.ColorChange.Frame.Visible = true else button.Text = 'Incorrect password - '..maxtries - tries..' tries left' tries = tries + 1 end end
end) ~~~~~~~~~~~~~~~~~ (Idk why the variables and start of function aren't showing up as script) When I type in the password the GUI doesn't show up and I get this in the output: "18:20:41.920 - Players.Player1.PlayerGui.PassGUI.Frame.TextButton.LocalScript:15: attempt to index field 'Parent' (a nil value)"
Any Ideas?
You run script.Parent.Parent.Parent:Destroy()
wich means you'd destroy everything inside of
script.Parent.Parent.Parent
including the script itself. dingus