So I have a moving part that moves in a certain direction when I join the game. Although whenever I jump on the moving part it I don’t move with the part. I was wondering how I can fix this.
I have a model in workspace and inside that model is a script:
for i = 0,1, .001 do
script.Parent.Parent:SetPrimaryPartCFrame(script.Parent.Parent:GetPrimaryPartCFrame() * CFrame.new(0,0,-1))
wait()
end
The script works fine but I want it where when you jump on the moving part, you move with it as well. Thanks.
I agree with @Downrest . Another option is maybe use the new cframe’s position and orientation and set the part’s .Position and .Orientation. This will give you the behavior you’re looking for.
local newCf = CFrame.new() -- the new cframe
part.Position = newCf.Position
part.Orientation = Vector3.new(newCf:ToOrientation())*180/math.pi