I am trying to make it to where when i press this button it locks me in first person but for some reason when i put script.Parent.Active = true it has a red squiggly line under the = sign saying Expected 'then', got '='
Script:
script.Parent.Parent.Parent.Parent.CameraMode="LockFirstPerson" function onBananaClicked() if script.Parent.Disabled = true then game.StarterGui.ScreenGui.Frame.Beep.FirstPerson.Disabled = true end script.Parent.MouseButton1Click:connect( onBananaClicked)
The 4 script.parents are caused because the button is inside a frame, inside a gui, inside the startergui, and thats inside the game.
Please help!
In the if statement on line 4, you wrote if script.Parent.Disabled = true then
instead of if script.Parent.Disabled == true then
(or if script.Parent.Disabled then
)
You're also missing an end
on line 6 to end the function.