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

how do i get this button to work?

Asked by 10 years ago

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)

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") nate890 495 — 10y
0
thankes chabad360 34 — 10y

1 answer

Log in to vote
-2
Answered by 10 years ago

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

Ad

Answer this question