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

Where do I put end in this script, and do I add a ')' with the end?

Asked by 5 years ago

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!

0
dude where are all your ends. greatneil80 2647 — 5y
0
ur missing every single end greatneil80 2647 — 5y
0
thats what i was asking - where do i put the ends lol sean_thecoolman 189 — 5y
0
No he's saying that you have 3 ends missing (which is literally all of them). Roblox auto puts ends down when you indent, so either you deleted them on accident, or this isn't your script. yellp1 193 — 5y
View all comments (2 more)
0
but when i put in the ends, it said it was an error sean_thecoolman 189 — 5y
0
i think i put them in the wrong place so thats why i asked where to put them sean_thecoolman 189 — 5y

1 answer

Log in to vote
1
Answered by
yellp1 193
5 years ago

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)
0
thank you so much sean_thecoolman 189 — 5y
Ad

Answer this question