|
| 17 Apr 2014 04:17 PM |
It's a normal tool in StarterPack.
function OnClicked() script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 25 wait(10) script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 16 end
script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
yoshiegg6
|
  |
| Joined: 20 Jul 2012 |
| Total Posts: 3191 |
|
|
| 17 Apr 2014 04:19 PM |
| Don't forget to add debounce so it isn't spam-able. But, I don't know why its not working. |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:20 PM |
its .Activated not .MouseButton1Click |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:25 PM |
Still doesn't work:
function OnClicked() debounce=true script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 25 wait(10) script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 16 end
script.Parent.Activated:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:26 PM |
debounce = false
function OnClicked() if debounce == false then debounce=true script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 25 wait(10) script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 16 debounce = false end end |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:32 PM |
That doesn't work either.
Is it supposed to be in a normal script or a localscript? |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
| |
|
|
| 17 Apr 2014 04:35 PM |
All right, it is. It still doesn't work. Again, this is a normal script inside a normal tool inside StarterPack. |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:35 PM |
sigh, localscript in a tool.
function OnClicked() if debounce == false then debounce = true game.Players.LocalPLayer.Character.Humanoid.WalkSpeed = 25 wait(10) game.Players.LocalPLayer.Character.Humanoid.WalkSpeed = 16 debounce = false end end
script.Parent.Activated:connect(OnClicked)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Apr 2014 04:42 PM |
Debounce isn't defined.
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:43 PM |
I defined it in the other, yet you decide its great to delete it.
debounce = false function OnClicked() if debounce == false then debounce = true game.Players.LocalPLayer.Character.Humanoid.WalkSpeed = 25 wait(10) game.Players.LocalPLayer.Character.Humanoid.WalkSpeed = 16 debounce = false end end
script.Parent.Activated:connect(OnClicked) |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:44 PM |
You deleted it...
"function OnClicked() if debounce == false then debounce = true game.Players.LocalPLayer.Character.Humanoid.WalkSpeed = 25 wait(10) game.Players.LocalPLayer.Character.Humanoid.WalkSpeed = 16 debounce = false end end
script.Parent.Activated:connect(OnClicked) "
this was YOUR post.
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:45 PM |
| Because I copy/pasted his >_> |
|
|
| Report Abuse |
|
|
| |
|
| |
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 17 Apr 2014 04:47 PM |
If your trying to get it to run when clicked, than Activated is need to get the mouse for the Button1Down event.
running = false
script.Parent.Activated:connect(function(mouse) mouse.Button1Down:connect(function() if not running then running = true game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 wait(10) game.Players.LocalPLayer.Character.Humanoid.WalkSpeed = 16 running = false end end) end) |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:49 PM |
local db = false local runtime = 10 --Change if needed.
script.Parent.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() if db == true then return end db = true game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 wait(runtime) game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 end) mouse.Button1Up:connect(function() if db == true then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 db = false end)
script.Parent.Unequipped:connect(function() game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 db = false end)
When life gives you lemons... BURN HIS HOUSE DOWN! >:D |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:49 PM |
| Did you guys not see him say that it worked, thread is dead. |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 04:52 PM |
@Sensei I did not... I keep getting ninja'd today... :(
When life gives you lemons... BURN HIS HOUSE DOWN! >:D |
|
|
| Report Abuse |
|
|