Ternous
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 1748 |
|
|
| 02 Oct 2015 04:31 AM |
Instead of Left mouse being pressed, how do I make it when the Shift Tool is pressed it sprints. isnt Shift like 48 or something?
speed = 70 script.Parent.Selected:connect(function(m) humanoid = script.Parent.Parent.Parent.Character.Humanoid m.Button1Down:connect(function() humanoid.WalkSpeed = speed end) m.Button1Up:connect(function() humanoid.WalkSpeed = 16 end) end) script.Parent.Deselected:connect(function() humanoid.WalkSpeed = 16 end) |
|
|
| Report Abuse |
|
|
Egzekiel
|
  |
| Joined: 10 Jan 2011 |
| Total Posts: 1079 |
|
|
| 02 Oct 2015 05:13 AM |
Replace the Button1Up by KeyUp and Button1Down by KeyDown *alert* ermeged keydown is deprecated use UIS 1!!1!111!!!!1! |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2015 08:31 AM |
srs use uis
i make u math.sqrt() |
|
|
| Report Abuse |
|
|
Ternous
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 1748 |
|
|
| 03 Oct 2015 12:08 AM |
So would it be like this
speed = 70 script.Parent.Selected:connect(function(m) humanoid = script.Parent.Parent.Parent.Character.Humanoid m.KeyDown:connect(function() humanoid.WalkSpeed = speed end) m.KeyUp:connect(function() humanoid.WalkSpeed = 16 end) end) script.Parent.Deselected:connect(function() humanoid.WalkSpeed = 16 end) |
|
|
| Report Abuse |
|
|