The script is contained within the ClickDetector. But when you click on the brick containing the ClickDetector, nothing happens. I'm not sure what's wrong. Help?
function onMouseClick()
game.Lighting.Ambient = {0,0,0} game.Workspace.Installation.EmergencyLights.Part.SpotLight.Enabled = true
local h = Instance.new("Hint") h.Parent = game.Workspace h.Text = "Emergency system reboot engaged, please stand by" wait(3)
h.Text = "System reboot beginning" wait(0.2) h.Text = "System reboot beginning ." wait(0.2) h.Text = "System reboot beginning . ." wait(0.2) h.Text = "System reboot beginning . . ." wait(0.2) h.Text = "[| ]" wait(0.5) h.Text = "[|| ]" wait(0.5) h.Text = "[||| ]" wait(0.5) h.Text = "[|||| ]" wait(0.5) h.Text = "[||||| ]" wait(0.5) h.Text = "[|||||| ]" wait(0.5) h.Text = "[||||||| ]" wait(0.5) h.Text = "[|||||||| ]" wait(0.5) h.Text = "[||||||||| ]" wait(0.5) h.Text = "[|||||||||| ]" wait(0.5) h.Text = "[||||||||||| ]" wait(0.5) h.Text = "[|||||||||||| ]" wait(0.5) h.Text = "[||||||||||||| ]" wait(0.5) h.Text = "[|||||||||||||| ]" wait(0.5) h.Text = "[||||||||||||||| ]" wait(0.5) h.Text = "[|||||||||||||||| ]" wait(0.5) h.Text = "[||||||||||||||||| ]" wait(0.5) h.Text = "[|||||||||||||||||| ]" wait(0.5) h.Text = "[||||||||||||||||||| ]" wait(0.5) h.Text = "[|||||||||||||||||||| ]" wait(0.5) h.Text = "[||||||||||||||||||||| ]" wait(0.5) h.Text = "[|||||||||||||||||||||| ]" wait(0.5) h.Text = "[||||||||||||||||||||||| ]" wait(0.5) h.Text = "[||||||||||||||||||||||||]" wait(0.5)
h.Text = "System reboot successful" wait(2) h:Remove()
game.Lighting.Ambient = {300,300,300} game.Workspace.Installation.EmergencyLights.Part.SpotLight.Enabled = false
end
script.Parent.MouseClick:connect(onMouseClick)
use lua code block to display the code correctly like this, also you can make this code smaller by using loops:- http://wiki.roblox.com/index.php?title=Loop
Hade some spare time so I fixed it
function onMouseClick() local h = Instance.new("Hint") h.Parent = game.Workspace h.Text = "Emergency system reboot engaged, please stand by" wait(3) sysRebTxt="System reboot beginning" h.Text = sysRebTxt addon=" ." for i=0,3 ,1 do sysRebTxt=sysRebTxt .. addon h.Text = sysRebTxt wait(0.2) end addon="|" curTxt="" for i=0,25,1 do curTxt=curTxt .. addon h.Text ="[" .. curTxt .. "]" wait(0.5) end wait(0.5) h.Text = "System reboot successful" wait(2) h:Remove() end script.Parent.MouseButton1Click:connect(onMouseClick)