No clue what im doing wrong, trying to change the orientation of the players arms after i attach them onto a viewmodel, although it just errors with
heres the code
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local RunService = game:GetService("RunService")
repeat task.wait() until game:IsLoaded()
repeat task.wait() until Character:IsDescendantOf(workspace)
local Rs1
local RightArmMotor = Character:WaitForChild("RightUpperArm"):WaitForChild("RightShoulder")
local LeftArmMotor = Character:WaitForChild("LeftUpperArm"):WaitForChild("LeftShoulder")
local FTorso = Instance.new("Part")
FTorso.Anchored = true
FTorso.CanCollide = false
FTorso.CanQuery = false
FTorso.CanTouch = false
FTorso.Size = Vector3.new(
Character.UpperTorso.Size.X,
math.floor((Character.UpperTorso.Size.Y + Character.LowerTorso.Size.Y)),
Character.UpperTorso.Size.Z
)
FTorso.Parent = workspace
RightArmMotor.Part0 = FTorso
LeftArmMotor.Part0 = FTorso
local function d()
local lasttime = os.time()
local movedelay = 3
Rs1 = RunService.RenderStepped:Connect(function()
if os.time() - lasttime > movedelay then
lasttime = os.time()
FTorso.CFrame = workspace.CurrentCamera.CFrame * CFrame.new(0,-1,0)
end
end)
end
local TorosCoro = coroutine.create(d)
coroutine.resume(TorosCoro)
local Anim = script.Animation
local Animator = Character:FindFirstChildWhichIsA("Humanoid").Animator
Animator:LoadAnimation(Anim):Play()
print(RightArmMotor.C0.Orientation) -- Errors with "Orientation is not a valid member of CFrame"
RightArmMotor.C0.Orientation = CFrame.fromOrientation(math.rad(90),0,0) -- Errors with "Orientation cannot be assigned to"
LeftArmMotor.C0.Orientation = CFrame.fromOrientation(math.rad(90),0,0) -- Errors with "Orientation cannot be assigned to"