I am working on an asset for a game where a spinning object is getting moved between to points. I have a anchored part and I am using a tween to move the part between two vector 3 values. I have another non anchored part attached to it with a Hinge Constraint. When I preview the place on the server end both parts move together between the two points. However when I play as I client only the anchored part seems to move while the non anchored part just floats in the air. Does anyone know why this is and is their an easy alterative solution to this problem?
local TweenService = game:GetService("TweenService")
local PositionGoal = {}
local Speed = (script.Parent.EndPosition.Value - script.Parent.StartPosition.Value).Magnitude /20
local TweenInfo = TweenInfo.new(Speed,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0)
while true do
PositionGoal.Position = script.Parent.EndPosition.Value
local Tween = TweenService:Create(script.Parent.Origin,TweenInfo,PositionGoal)
Tween:Play()
Tween.Completed:Wait()
--The next part resets object back to its orignial postion
PositionGoal.Position = script.Parent.StartPosition.Value
local Tween = TweenService:Create(script.Parent.Origin,TweenInfo,PositionGoal)
Tween:Play()
Tween.Completed:Wait()
end
