Hi there so i’ve been recently having a problem with cframes. As you can see in the video sometimes the strollers cframe won’t exactly go to the right position i set.
here’s the code:
function Stroller:AttachStroller(character: Model)
local humanoid_root_part = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
local animator: Animator = humanoid:WaitForChild("Animator")
humanoid_root_part:SetNetworkOwner(nil)
humanoid.WalkSpeed -= 5
self.stroller_model.CFrame = CFrame.new(humanoid_root_part.CFrame.X - 3.5, humanoid_root_part.CFrame.Y - 1.1, humanoid_root_part.CFrame.Z)
local weld_cons = Instance.new("WeldConstraint")
weld_cons.Part0 = humanoid_root_part
weld_cons.Part1 = self.stroller_model
weld_cons.Parent = weld_cons.Part1
self.stroller_model.CFrame *= CFrame.Angles(math.rad(-90), 0, 0)
self.stroller_model.Parent = workspace
end