I'm trying to make a cannon that will fire projectiles stored in ServerStorage
Whenever I try to call out the item, instead of cloning a freestanding object where the barrel of the Cannon is, it simply merges the fireball with the Cannon model after spawning a cannonball in relative to it's last place on the Workspace before it was moved to ServerStorage.
I need it to be able to be spawned at the "Barrel" point of Model named Cannon to the point where I can apply a vector force and the likes.
local storage = game:GetService("ServerStorage") local cBall = storage["cannonBall"]:Clone() cBall.Parent = game.Workspace.Cannon.Barrel
This is what I have so far, I can't go any further due to the part either not spawning in or it being merged into the Cannon model
Thanks in advance for any help
~MBacon15
That should clone your part into the other object. However, you need to change the position of the part you cloned, here is an example for your script;
local storage = game:GetService("ServerStorage") local cBall = storage["cannonBall"]:Clone() cBall.Parent = game.Workspace.Cannon.Barrel cBall:MoveTo(game.Workspace.Cannon.Barrel.Position)
That uses the :MoveTo() function, you can use the position property, but MoveTo is much easier.
If you want to learn more about the MoveTo function, here is the wiki page:
http://wiki.roblox.com/index.php?title=API:Class/Model/MoveTo
If this helps, then click "Accept" answer, it gives us both rep!