|
| 09 Jan 2016 04:53 PM |
how would i :remove() The fire part from workspace? after its done the damage?
repeat coroutine.yield() until game.Players.LocalPlayer.Character
local player = game.Players.LocalPlayer local char = player.Character function GetBullet() local p = game.ReplicatedStorage.Main.Projectiles.Fire:Clone() p.CanCollide = false p.Parent = game.Workspace Instance.new("BodyVelocity",p) return p end script.Parent.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() local mH = mouse.Hit local bullet = GetBullet() bullet.CFrame = script.Parent.Handle.CFrame * CFrame.new(char.Torso.CFrame.lookVector * 2) bullet.CFrame = CFrame.new(bullet.Position, mH.p) bullet.BodyVelocity.velocity = bullet.CFrame.lookVector * 120 wait(5) bullet:remove()
bullet.Touched:connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") local name = player.Character.Name if humanoid then if hit.Parent.Name ~= name then humanoid:TakeDamage(10)
end end end) end) end)
Hi Wanna Be friends? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 05:05 PM |
B please someone help a noob in need...
Hi Wanna Be friends? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 05:13 PM |
game.Debris:AddItem(fire, 6)
http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217 |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 05:14 PM |
oh after damage: After: "humanoid:TakeDamage(10)" put: p:Destroy()
http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217 |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 05:15 PM |
| You don't. You :Destroy it. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 05:23 PM |
Why do we destroy it might I ask? Whats the difference?
(I should be using the wiki to answer this but my internet is slow as crap... sorry for the inconvenience!)
Hi Wanna Be friends? |
|
|
| Report Abuse |
|
|
irrupted
|
  |
| Joined: 30 Jul 2015 |
| Total Posts: 13 |
|
|
| 09 Jan 2016 05:27 PM |
| remove is deprecated and inefficient |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 05:55 PM |
"p:destroy()"
Unknown global 'p'
How do I fix it?
#code Print("I'm a noob at scripting")
Hi Wanna Be friends? |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jan 2016 06:13 PM |
:Destroy() not :destroy() lol
icekiller8002 > dinosaur hat n00b |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:14 PM |
replace p with player
p is sometimes used as a variable to define player but you defined the player as 'player' and not p
|
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:15 PM |
Im trying to remove the Fire, not the player.
#code --[[wot]]-- |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:16 PM |
@Icekiller8002 I know, Tried it but unknown global event 'p'
#code --[[wot]]-- |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:20 PM |
w8 nvm I was being stupid.
#code --[[wot]]-- |
|
|
| Report Abuse |
|
|
Iplaydev
|
  |
| Joined: 19 Dec 2011 |
| Total Posts: 292 |
|
|
| 09 Jan 2016 06:23 PM |
wrong kind-o forum
my FACEEE |
|
|
| Report Abuse |
|
|
Iplaydev
|
  |
| Joined: 19 Dec 2011 |
| Total Posts: 292 |
|
|
| 09 Jan 2016 06:24 PM |
o god i was dumb this isn't OT sorry 'right' forum
my FACEEE |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:24 PM |
q.q its still not working.... Unknown global event 'p'
#code --[[wot]]-- |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:26 PM |
repeat coroutine.yield() until game.Players.LocalPlayer.Character
local player = game.Players.LocalPlayer local char = player.Character function GetBullet() p = game.ReplicatedStorage.Main.Projectiles.Fire:Clone() p.CanCollide = false p.Parent = game.Workspace Instance.new("BodyVelocity",p) return p end script.Parent.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() local mH = mouse.Hit local bullet = GetBullet() bullet.CFrame = script.Parent.Handle.CFrame * CFrame.new(char.Torso.CFrame.lookVector * 2) bullet.CFrame = CFrame.new(bullet.Position, mH.p) bullet.BodyVelocity.velocity = bullet.CFrame.lookVector * 120 wait(5) bullet:remove()
bullet.Touched:connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") local name = player.Character.Name if humanoid then if hit.Parent.Name ~= name then humanoid:TakeDamage(10) p:Destroy() end end end) end) end)
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:28 PM |
Bullet:remove() isnt meant to be there
also p:destroy() isnt working.. the part is still in workspace.
#code --[[wot]]-- |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:30 PM |
Instead of
"wait(5) bullet:remove()"
do:
wait(5) p:Destory()
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:32 PM |
typo: "Destory" should be Destroy* ;)
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:39 PM |
That only removes it IF it hits a humanoid, I want it to remove regardless.
I can't figure it out.
#code --[[wot]]-- |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:40 PM |
I like your skin, Dude!
This Post is Pointless |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:48 PM |
Someone ;-;?
#code --[[wot]]-- |
|
|
| Report Abuse |
|
|