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

Is there a way to change a models position?

local model = game.Lighting
local pos = game.Workspace.Pos.Position
function ontouch(hit)
if hit.Parent:FindFirstChild("Humanoid")~= nil then
		model:Clone()
		model.Position = pos
		model.Parent = game.Workspace
	end
end

i want to change a models position to somewhere else. is there a way to do that? the model has more then 20 parts in it? how can i move the whole model without having to write a change position code for each part.

1 answer

✓ Accepted answer

You would use the :MoveTo method.

local model = game.Lighting
local pos = game.Workspace.Pos.Position
function ontouch(hit)
if hit.Parent:FindFirstChild("Humanoid")~= nil then
       local cloned =  model:Clone()
        cloned:MoveTo(xyz) -- place the values here
        cloned.Parent = game.Workspace
    end
end

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