Why does the viewmodel offset value not change when i need it to?

Hey there, for fun i’m currently working on a fps project where i want to make the game as customizable as possible, and currently I’ve been working on customizing viewmodel offsets, as i was inspired by the way krunker did it and wanted to replicate it, so i got towards it but I started having a problem with it, the menu and the actual custom values work, but it doesn’t replicate itself to the actual custom model, as shown by the small video below.

however as you could tell by the video, it doesn’t change at all.

Here’s kinda what i do, so how come the weapon’s offset doesn’t change it’s value? sorry it’s a little different than what the title was, sorry :frowning:

and the UI portion is just when you click apply it changes the value to whatever the textbox says, so it’s all on the weapons end.

what i did for the weapons:

--where i call the values for the positions, currently using shared until i rewrite it
local xAxisPosition = tonumber(shared.xAxisValue)
local yAxisPosition = tonumber(shared.yAxisValue)
local zAxisPosition = tonumber(shared.zAxisValue)
local rotatePosition = tonumber(shared.rotateValue)

--//rig placement placement locations

local arms = --fully rigged viewmodel.
local joint = Instance.new("Motor6D")
joint.C0 = CFrame.new(xAxisPosition, yAxisPosition, zAxisPosition)

joint.Part1 = arms.UpperTorso
joint.Part0 = arms.Head 
joint.Parent = arms.Head

--how i do my weapon sway and such, because i'm lazy to do springs
RunService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value + 1, function()
	local position = CFrame.new(Camera.CFrame.p)
    local startRotation = arms.Head.CFrame - arms.Head.CFrame.p
    local goalRotation = Camera.CFrame - Camera.CFrame.p
    local speed = rotatePosition -- Between 0 and 1, lower causes more movement "lag"
    arms.Head.CFrame = position * startRotation:lerp(goalRotation, speed)
end)

any help is appreciated, if i did something completely stupid here please shout that out so i’ll fix it :slight_smile:

Where does the script use the value from the gui?

so since I wanted to merely test it out and not do datastores for it yet, the script is as simple as this.

– if you’re talking about the shared value, that is.

local yBox = script.Parent.Parent.yAxisBox
shared.yAxisValue = yBox.Text


script.Parent.MouseButton1Click:connect(function()
shared.yAxisValue = yBox.Text
print(shared.yAxisValue) -- to make sure it actually worked, lol.
end)``````