luninini
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 18 |
|
|
| 11 Nov 2015 01:08 PM |
| So i have no idea how you type this in but can someone tell please cause it could be helpful. |
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 11 Nov 2015 01:09 PM |
| Why not use Instance.new()? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 11 Nov 2015 01:09 PM |
LoadLibrary("RbxUtility").Create("Explosion"){ Position = Vector3.new(4,2,0) } |
|
|
| Report Abuse |
|
|
|
| 11 Nov 2015 01:15 PM |
| Of course, that still uses Instance.new, rayk. |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 11 Nov 2015 01:17 PM |
You insert the explosion with the tool bar
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
luninini
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 18 |
|
|
| 11 Nov 2015 01:36 PM |
I might have runned into a problem with a script and i'm wondering if you can help XD.
Code:
gun = script.Parent ammo = 5 player = game.Players.LocalPlayer mouse = player:GetMouse() function Shoot() if ammo > 0 then Bullet = Instance:Clone(game.ServerStorage.Yolo) Bullet.CFrame = gun.Handle.CFrame Bullet.CFrame = CFrame.new(Bullet.Position,mouse.Hit.p) v = Instance.new("BodyVelocity",Bullet) v.velocity = Bullet.CFrame.lookVector *90 v.maxForce = Vector3.new(math.huge, math.huge, math.huge) end end
gun.Activated:connect(Shoot)
I don't know how to fix it XD and i don't know how to use that instance clone. |
|
|
| Report Abuse |
|
|
|
| 11 Nov 2015 01:39 PM |
local new = function (class, parent) Instance.new(class, parent) end
OT in a nutshell: https://www.youtube.com/watch?v=KDRAhiBtOrQ |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 11 Nov 2015 02:07 PM |
what Instance:Clone()? what
game.ServerStorage.Yolo:Clone()
-=Robo=- |
|
|
| Report Abuse |
|
|
luninini
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 18 |
|
|
| 11 Nov 2015 02:22 PM |
| Did what you just said some time before but it didn't seem to work either. ;( |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 11 Nov 2015 02:28 PM |
local gun = script.Parent local ammo = 5 local player = game.Players.LocalPlayer local mouse = player:GetMouse()
local function Shoot() if ammo > 0 then local Bullet = game.ServerStorage.Yolo:Clone() Bullet.CFrame = CFrame.new(gun.Handle.Position, mouse.Hit.p) v = Instance.new("BodyVelocity",Bullet) v.velocity = Bullet.CFrame.lookVector * 90 v.maxForce = Vector3.new(math.huge, math.huge, math.huge) end end
gun.Activated:connect(Shoot)
what's the error? is the bullet anchored? lol
-=Robo=- |
|
|
| Report Abuse |
|
|
luninini
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 18 |
|
|
| 11 Nov 2015 02:39 PM |
| Nope its not anchored, it doesn't come up with a error in the output either. So i'm having trouble finding out what was done wrong. I even just changed my stuff into what ya made just now and it still didn't work :/. It simply just doesn't shoot. ;(. Could it be that it doesn't know which mouse button i have to press? |
|
|
| Report Abuse |
|
|
cars37
|
  |
| Joined: 27 Nov 2013 |
| Total Posts: 189 |
|
|
| 11 Nov 2015 02:47 PM |
| Edit the game xml to include an explosion then clone it |
|
|
| Report Abuse |
|
|
luninini
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 18 |
|
|
| 11 Nov 2015 02:53 PM |
| I'm past that but thanks anyway, what i'm trying right now is to add a bullet to my gun :( not going that well tho XD |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 11 Nov 2015 05:00 PM |
Local or server script?
-=Robo=- |
|
|
| Report Abuse |
|
|
luninini
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 18 |
|
|
| 12 Nov 2015 03:26 AM |
| I use local script on this tool. Could it be i need to use a server script? |
|
|
| Report Abuse |
|
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 12 Nov 2015 07:47 AM |
well, really blatant mistake parent the bullet to workspace lol
-=Robo=- |
|
|
| Report Abuse |
|
|
luninini
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 18 |
|
|
| 12 Nov 2015 08:53 AM |
| For some time ago i recreated everything with instance.new and now it works XD. Tho it did take some time since i had to make things that i just could have cloned ;( |
|
|
| Report Abuse |
|
|