xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
|
| 16 Nov 2015 04:49 PM |
function onActivated()
if not Tool.Enabled then return end
Tool.Enabled = false
local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end
t = r.Stepped:wait()
if (t - last_attack < .2) then lunge() else attack() end
last_attack = t
--wait(.5)
Tool.Enabled = true end
This was inside the linked sword script
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$1,867 Tx1,483 |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2015 04:52 PM |
| http://wiki.roblox.com/index.php?title=API:Class/RunService/Stepped |
|
|
| Report Abuse |
|
|
Eauz
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 2942 |
|
|
| 16 Nov 2015 04:59 PM |
RenderStepped:connect(function() end)
fires every-frame, let's say you are running at 60fps, then this function will fire 60 times a second. It's faster than wait().
It can be really used for anything that requires insane speed like tornados that suck in objects, animations or even to replace wait() in some situations.
I have basic understanding of it.. maybe someone can add more.
Just be grateful. |
|
|
| Report Abuse |
|
|
Cryptize
|
  |
| Joined: 01 Oct 2010 |
| Total Posts: 949 |
|
|
| 16 Nov 2015 05:12 PM |
It's basically a while wait() do loop but runs at 60FPS rather than 30FPS
It's awesome I <3 it |
|
|
| Report Abuse |
|
|
xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
|
| 16 Nov 2015 05:25 PM |
k ty
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$1,867 Tx1,483 |
|
|
| Report Abuse |
|
|