generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How do i use explosion without instance.new?

Previous Thread :: Next Thread 
luninini is not online. 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 is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
11 Nov 2015 01:09 PM
Why not use Instance.new()?
Report Abuse
rayk999 is not online. 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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
11 Nov 2015 01:15 PM
Of course, that still uses Instance.new, rayk.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
11 Nov 2015 01:16 PM
yeah i know :(
Report Abuse
Dogejia is not online. 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 is not online. 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
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
11 Nov 2015 05:00 PM
Local or server script?

-=Robo=-
Report Abuse
luninini is not online. 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
DarthStrantax is not online. DarthStrantax
Joined: 31 May 2011
Total Posts: 2610
12 Nov 2015 03:27 AM
loadasset
Report Abuse
robocu3 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image