Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
|
| 11 Jul 2014 08:07 PM |
while true do wait(600)
function onMouseClick() |
|
|
| Report Abuse |
|
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 11 Jul 2014 08:12 PM |
learn2script I'm guessing this is a gui.
script.Parent.MouseButton1Click:connect(function() if script.Parent.Visible then script.Parent.Visible=false wait(600) script.Parent.Visible=true end end) |
|
|
| Report Abuse |
|
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
|
| 11 Jul 2014 08:27 PM |
| No, it's not for a GUI. It's for a clickable brick. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 08:29 PM |
| Set the MaxActivationDistance to 0. |
|
|
| Report Abuse |
|
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 11 Jul 2014 08:29 PM |
The part should have two things in it then: -A ClickDetector object -This script:
CanClick=true script.Parent.ClickDetector.MouseClick:connect(function() if CanClick then CanClick=false wait(600) CanClick=true end end) |
|
|
| Report Abuse |
|
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
|
| 11 Jul 2014 08:41 PM |
Would putting that script within the current one work? I made a new script and put the script in it, but it didn't work. So, I tried putting it within the existing script. Still not working though.
function onMouseClick()
game.Lighting.Ambient = Color3.new(0,0,0) for i,v in pairs(game.Workspace.Installation.EmergencyLights:GetChildren()) do local sl = v:FindFirstChild("SpotLight") if sl then sl.Enabled = true
for i,v in pairs(game.Workspace.Installation.EmergencyLights:GetChildren()) do local pl = v:FindFirstChild("PointLight") if pl then pl.Enabled = true end end end end
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 = Color3.new(1,1,1) for i,v in ipairs(game.Workspace.Installation.EmergencyLights:GetChildren()) do local sl = v:FindFirstChild("SpotLight") if sl then sl.Enabled = false
for i,v in pairs(game.Workspace.Installation.EmergencyLights:GetChildren()) do local pl = v:FindFirstChild("PointLight") if pl then pl.Enabled = false end end end end CanClick=true script.Parent.MouseClick:connect(function() if CanClick then CanClick=false wait(600) CanClick=true end end)
end
script.Parent.MouseClick:connect(onMouseClick) |
|
|
| Report Abuse |
|
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
| |
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
| |
|
|
| 12 Jul 2014 12:01 AM |
To explain my previous suggestion more clearly, an example would be, game.Workspace.Part.ClickDetector.MouseClick:connect(function() game.Workspace.Part.ClickDetector.MaxActivationDistance = 0 wait(SecondsHere) game.Workspace.Part.ClickDetector.MaxActivationDistance = 32 end) |
|
|
| Report Abuse |
|
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
|
| 12 Jul 2014 12:14 AM |
| That is the amount of space between the player and the object. So, how far away someone has to be to be able to click the button. That's not what I need... |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 12:23 AM |
| The idea is that it would wait a certain amount of seconds before becoming "Clickable" again. |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 12 Jul 2014 02:25 AM |
| You could add a debounce. That would just make the script run once until the script ends. They are very useful, yo. |
|
|
| Report Abuse |
|
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
|
| 12 Jul 2014 03:24 AM |
| AnonyAnonymous, I put your suggested piece of script into the existing script, but it did not make the button not clickable. |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 12 Jul 2014 03:26 AM |
"The idea is that it would wait a certain amount of seconds before becoming "Clickable" again." ... He said IDEA. pls, read carefully. He may have intended it to work though so idk. |
|
|
| Report Abuse |
|
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
|
| 12 Jul 2014 03:28 AM |
| And I'm telling him that his "idea" did not work, regardless or not if he had hopes that it would. |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 12 Jul 2014 03:29 AM |
And I'm telling YOU that ideas don't always work. k? k. |
|
|
| Report Abuse |
|
|
blox6137
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 1109 |
|
|
| 12 Jul 2014 03:30 AM |
Also, that was only an example. pls, read carefully. AnonyAnonymous probably wanted you to implement your own version of the script. |
|
|
| Report Abuse |
|
|
Chubs1995
|
  |
| Joined: 02 Sep 2007 |
| Total Posts: 339 |
|
|
| 12 Jul 2014 04:41 AM |
| I'm not good at scripting. |
|
|
| Report Abuse |
|
|