Code I have so far:
isHoodOpen = false script.Parent.ClickDetector.MouseClick:Connect(function() script.Parent.CFrame = script.Parent.Parent["FrontHood_I"].CFrame script.Parent.Orientation = ("0, 0, -30") isHoodOpen = true script.Parent.ClickDetector.MouseClick:Connect(function() if isHoodOpen == true then print("OH ITS OPEN!") elseif isHoodOpened == false then script.Parent.CFrame =("80.96, 6.76, 759.43") script.Parent.Orientation = ("0, 0, 0")
It has been frustrating to sit for hours trying to figure out where the 'end's in the script go! And when I put the ends in the script, it wants a ')' but then when I add it, it says it's an error! Please help!
Hopefully this is all of your code or this answer will not work. Anyways, this should fix your problem :D
local isHoodOpen = false script.Parent.ClickDetector.MouseClick:Connect(function() script.Parent.CFrame = script.Parent.Parent["FrontHood_I"].CFrame script.Parent.Orientation = ("0, 0, -30") isHoodOpen = true end) script.Parent.ClickDetector.MouseClick:Connect(function() if isHoodOpen then print("OH ITS OPEN!") elseif not isHoodOpened then script.Parent.CFrame =("80.96, 6.76, 759.43") script.Parent.Orientation = ("0, 0, 0") end end)