|
| 10 Feb 2014 12:03 AM |
you press b there's like a 4 second cooldown
i'm trying to learn lua and so yeah, i'm making a magic game w/ magic tools and this is what i have so far
would be helpful too if somebody could tell me how to apply the venomshank's venom (DoT) ability in Snakebite
function Snakebite() local brick = Instance.new("Part") brick.Parent = game.Workspace brick.Name = "Venom" brick.Size = Vector3.new(10,10,10) brick.BrickColor = BrickColor.Green() end
local tool = script.Parent tool.Selected:connect(function(mouse) mouse.KeyDown:connect(function(key) if key == "b" then print("The poison is sinking into our victim!") Snakebite() end end) end) print 'The Magic is Online!' function Magic() print("Arcane Arts trying to launch!") print("They areee trying to laaaunch!") end
Magic()
|
|
|
| Report Abuse |
|
|
jakej78b
|
  |
| Joined: 09 Mar 2011 |
| Total Posts: 813 |
|
|
| 10 Feb 2014 12:05 AM |
local cooldown = false
function Snakebite() local brick = Instance.new("Part") brick.Parent = game.Workspace brick.Name = "Venom" brick.Size = Vector3.new(10,10,10) brick.BrickColor = BrickColor.Green() end
local tool = script.Parent tool.Selected:connect(function(mouse) mouse.KeyDown:connect(function(key) if key == "b" and (not cooldown) then cooldown = true print("The poison is sinking into our victim!") Snakebite() wait(4) cooldown = false end end) end) print 'The Magic is Online!' function Magic() print("Arcane Arts trying to launch!") print("They areee trying to laaaunch!") end
Magic() |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 12:08 AM |
Thanks Jake, appreciate it, couldn't find out how to do that for quite some time
Now if only I can find out how to apply the venom from a venomshank into here.. |
|
|
| Report Abuse |
|
|
jakej78b
|
  |
| Joined: 09 Mar 2011 |
| Total Posts: 813 |
|
|
| 10 Feb 2014 12:23 AM |
| Just make another script that slowly degenerates the humanoids health, or make a coroutine. |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 04:39 PM |
Would I have to use onTouch so that when it's touched, the humanoid slowly loses hp, and add a wait?
I hope it is, because then I know what to do. |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 04:40 PM |
| What is this "lua" you speak of? Roblox only runs on Lua :| |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 04:44 PM |
| lol, yeah. I was kind of sleepy when I posted this, I was kind of sleepy. Apologies. @solstice |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 04:44 PM |
| It is fine. Also nice primary group :| |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 04:47 PM |
@Sol,
It's for when I go foruming on other forums besides this.
And I just saw my mistake in the last post, I said I was tired 2 times, 2nd time meant that I went to bed soon after that. |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 05:25 PM |
i have a new problem, how do I make it so that every time you touch the block, you lose 20 health?
i'm trying to use onTouched to make it so that every time you touch it you lose 20 hp
i'm sorry if this troubles the people here, I just would like to know |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 05:30 PM |
block = Pathway to block (example: script.Parent.Parent) db = false t = 5 --Change 5 to how long before the block can be touched again
function hit(h) if h.Parent:findFirstChild("Humanoid") then if db == false then db = true h.Parent.Humanoid.Health = h.Parent.Humanoid.Health-20 wait(t) db = false end end end
block.Touched:connect(hit) |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 05:46 PM |
@Xtreme,
What do I do with that?
As I've changed the pathway to block into what's inside the example
But I don't get it, explain please? |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 05:56 PM |
The block's pathway is basically where it is. If its parented to the script it would be script.Parent
Also, that was the script you asked for...to remove 20 health everytime someone touches a block... |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2014 06:25 PM |
| Oh, I know, I just didn't get the example part.. heheh. It actually clarified it up |
|
|
| Report Abuse |
|
|