Tank Spawns Next to Character

I am trying to create a button to insert a tank but currently it only spawns at the position that I uploaded the tank. How would I make it spawn next to me?

May you be able to screenshot this? This might help with a solution.

set the position = desired position using vector 3’s

so

(might be tank.primarypart)
Tank.Position = player.Character.HumanoidRootPart.Position + Vector3.new(0,0,0)

--change the 0's according to how you need it to be
1 Like

Simple, add a part and make it so that the tanks spawns there using .poistion

Ok. I guess. I dont know how this will help. :confused:

There are so many parts in the tank this would be very very hard.

Make it a model, or a union


Ive done this before with my tycoon.

thats why there exists a thing called welding, moving the primary part (assuming you have it welded and assigned a primary part to begin with) would move the entire model

huh. can you plz explain this better? i am very confused

It is a model already. now what do i do?

Here one sec lemme type out a script real quick and ill explain

	local newPart = dirtyRock:Clone()
	newPart.Parent = objectsFolder
	local pivot = dropper.Position
	newPart:MoveTo(pivot)

This is a simple script where i take a dirty rock and make its position the dropper which is a part that is invisible

(You will have to define the dropper part, and change the dirty rock to the tank. The folder is just for storing stuff to make less clutter)

MoveTo is used to move a model, and the thing in the parenthesis is the desired location.

Huh. this really did not help how confused i am.

Ok then what are you confused about?

Pretty much everything you just said

Ill try to explain better give me a sec.

Uhhhh. Wat :confused: :confused:

wordssssssssssssss

local tycoon = script.Parent.Parent.Parent     --The tycoon I model where all the tycoon stuff goes into.
local objectsFolder = tycoon.Objects   --The folder where you will be storing your tanks, for less clutter 
local dropper = script.Parent.Dropper  --The dropper is the position where you want the tank to spawn.
local tank = game.ReplicatedStorage["(Your tank name)"]   --Defining what the tank is, replicated storage is used when cloning stuff



while true do  --While true is an infinite loop, you will change this to a touch/click function depending on how you spawn the tank
	wait(3) --we wait 3 seconds, you can take this out since it is just used to spawn the object every three seconds since this is an example from my tycoon

	local newPart = tank:Clone() -- We make a clone of the tank 
	newPart.Parent = objectsFolder   --we parent it to the folder, for less clutter in the game workspace. To make it neat.
	local position = dropper.Position --We find the droppers position
	newPart:MoveTo(position) --We use MoveTo(), to move the part from where you originally made it, to the dropper position


end


Hopefully this helps. If you have any more questions please ask!

I don’t know how this would work with this script

local InsertService = game:GetService("InsertService")

script.Parent.MouseButton1Click:Connect(function()
	if script.Parent.Parent.Parent.Parent.Parent.Name == "phyouthcenter1" then
		InsertService:LoadAsset(7360321089).Parent = game.Workspace
	else
		script.Parent.Parent.Parent.Parent.Parent:Kick("Nice try bro.")
	end
end)

Could you explain what is going on here?