I made a script where your character follows the mouse only on the y axis, which was working as expected, and then I tested it with my alt and then with my friend. The script works for me and my alt, but after I tested it with a friend, it didn’t work. After much testing, I have come to the conclusion that the Roblox bundle has different motor6d properties, which makes the script unable to find the “C0” in the waist inside of the player’s upper torso (I could be wrong here).
My Bundle:
My Alt Bundle:
My friends’ bundle:
The script that is getting errors at line 9 (LocalScript that is located in “StarterCharacterScripts”)
local tweenService = game:GetService("TweenService")
local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local Character = script.Parent;
local Root = Character:WaitForChild("HumanoidRootPart")
local Waist = Character:FindFirstChild("Waist", true)
local YOffset = Waist.C0.Y
local CFNew, CFAng = CFrame.new, CFrame.Angles
local asin = math.asin
game:GetService("RunService").RenderStepped:Connect(function()
local CameraDirection = Root.CFrame:toObjectSpace(Camera.CFrame).lookVector
if Waist then
if Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
Waist.C0 = CFNew(0, YOffset, 0.1) * CFAng(0, 0, 0) * CFAng(asin(CameraDirection.y), 0, 0)
elseif Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
Waist.C0 = CFNew(0, YOffset, 0) * CFAng(3 * math.pi/2, 0, math.pi) * CFAng(0, 0, -asin(CameraDirection.x)) * CFAng(-asin(CameraDirection.y), 0, 0)
end
end
end)
game.ReplicatedStorage.Events.Look.OnClientEvent:Connect(function(otherPlayer, waistCFrame)
local Waist = otherPlayer.Character:FindFirstChild("Waist", true)
if Waist then
tweenService:Create(Waist, TweenInfo.new(.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0), {C0 = waistCFrame}):Play()
end
end)
while wait(1) do
game.ReplicatedStorage.Events.Look:FireServer(Waist.C0)
end
The error output:
