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

how do i get this button to work?

i used the roblox doorbell stamp and modded it so i could use it for a slideshow. my code seems to be messed up and i dont know where. here is the clickdetector script

button.ClickDetector.MouseClick:connect(function()
	on()
	main = script.parent.parent.parent:findfirstchild("auditorium")
	theater = main.slide.Decal
	wait(3)
	theater.Texture("http://www.roblox.com/asset/?id=152938241")
	wait(10)
	theater.Texture("http://www.roblox.com/asset/?id=152939886")
	wait(60)
	theater.Texture("http://www.roblox.com/asset/?id=6964326")
	off()
end)

2 comments

0

Lua is case sensitive. "Parent" should be capitalized and so should "FindFirstChild." To change a value, we use an equals sign, not parenthesis (i.e. theater.Texture = "http://www.roblox.com/asset/?id=152938241")

0

thankes

1 answer

The first line should be : local cd =script.Parent:findFirstChild("ClickDetector") Then cd.MouseClcik:connect(function() Script, etc.

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