I'm currently making a CFramed roller coaster, I would just like to know if there is any way to script a CFrame so that the model goes to the position of another block instead of manually scripting each move.
Sure, looks like this:
-- To instantly teleport a part, do this local PartToCFrame = game.Workspace.Part local GoalPart = game.Workspace.GoalPart PartToCFrame.CFrame = CFrame.new(GoalPart.Position)
Edit: If you would like to control how long the move should take, You should use TweenService. This looks like this:
local TweenService = game:GetService("TweenService") local PartToControl = game.Workspace.Part local GoalPart = game.Workspace.GoalPart local Goal = game.Workspace.GoalPart.Position local tweenInfo = TweenInfo.new( 5 -- Time that it will take to move the part -- There are more arguments that you can pass here, to search them refer to link below ) local MoveAction = TweenService:Create(PartToControl, tweenInfo, Goal) MoveAction:Play()
Hope this helped! - Zyrun