R15 viewmodel error

So i want to make a viewmodel for my game. but in console it says Transform is not a valid member of Attachment “Workspace.comradeshvab.UpperTorso.LeftShoulderRigAttachment”

is there any way to fix that???

local LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local RenderStepped = game:GetService("RunService").RenderStepped
local ViewModel = game:GetService("ReplicatedStorage").ViewModel:Clone()
local ViewModelRoot = ViewModel.PrimaryPart

ViewModel.Parent = workspace

RenderStepped:Connect(function ()
	ViewModelRoot.CFrame = workspace.CurrentCamera.CFrame * CFrame.new(0, -1.5, 0)
	-- Hardcoded logic test
	ViewModel.UpperTorso.LeftShoulderRigAttachment.Transform = Character.UpperTorso.LeftShoulderRigAttachment.Transform
	ViewModel.UpperTorso.RightShoulderRigAttachment.Transform = Character.UpperTorso.RightShoulderRigAttachment.Transform

Play you game, then view Workspace in your Explorer window.

Look inside your character and go to UpperTorso.LeftShoulderRigAttachment.

Make sure your Properties window is open.

You will notice that Transform is not a valid member of the LeftShoulderRigAttachment.

Valid members are the options you see available in the Properties window that you can change the values of.

1 Like

is there anything simular i can use instea of transform?

I am not sure what you are trying to do.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.