Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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!

6 comments

0

dude where are all your ends.

0

ur missing every single end

0

thats what i was asking - where do i put the ends lol

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.

0

but when i put in the ends, it said it was an error

0

i think i put them in the wrong place so thats why i asked where to put them

1 answer

✓ Accepted answer

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)

1 comment

0

thank you so much

This discussion is preserved as it was. New answers, comments, and votes are closed.