Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Moving objects in script?

I have tried this in every way I could think of and in WILL NOT move the object (btw, I don't need the model to be there, that was just another failed attempt)

while wait (5) do
	Model = Instance.new("Model", workspace)
	Ball = Instance.new("Part", Model)
	Ball.Shape = "Ball"
	Ball.BrickColor = BrickColor.new("Really black")
	pos = Vector3.new(script.Parent.Parent.Torso.Position - Vector3.new(0,10,0))
	Model:MoveTo(pos)
	Ball.Touched:connect(function(hit)
	local Boom = Instance.new("Explosion", Ball)
	Boom.Position = Vector3.new(Ball.Position)
	Boom.BlastRadius = 10
	Boom.BlastPressure = 10
	end)
end

1 answer

✓ Accepted answer

On line 10, you are changing the Position. You are attempting something along the lines of : Vector3.new(Vector3.new())

The Position property already returns a Vector3, there is no need to create a new one and it will throw an error.

This discussion is preserved as it was. New answers, comments, and votes are closed.