Can't Get Position and Change the Position of a Model

I try to make an endless road but can’t get models position,
image
this is the script.
image
and this is the model.
Duplicate is the touch part.

GetPivot only gets the Pivot point of the Part.
You are cloning it, but not actually moving it.

You can just PivotTo to move the road to the next point on the Z axis.

This should work

local part = script.Parent.PrimaryPart

part.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	
	if player then
		local modelClone = script.Parent:Clone()
		modelClone.Parent = workspace
		
		modelClone:PivotTo(modelClone:GetPivot() * CFrame.new(0,0,2500))
	end
end)
1 Like

This worked for me thank you very much it needs to change little bit but its working thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.