I have set up my viewmodel to my camera, but there is one thing. I want to make it smaller, as well as moving it around. Resizing it in workspace does nothing by the way, already tested it.
Here is the framework that handles the viewmodel:
repeat
wait()
until game:IsLoaded()
local Primary = "AKM"
local currentgun = nil
local uis = game:GetService("UserInputService")
local renderstepped = game:GetService("RunService").RenderStepped
local currentcamera = game.Workspace.CurrentCamera
local function equip(gun)
if currentgun ~= gun then
currentgun = gun
print(gun)
local gun = game.ReplicatedStorage.Viewmodels[gun]:Clone()
gun.Parent = game.Workspace.CurrentCamera
gun.Name = "Arms"
-- animations start
local idle = gun.Animation:LoadAnimation(gun.Idle)
idle:Play()
-- animations end
end
end
equip(Primary)
renderstepped:Connect(function()
if currentcamera:FindFirstChild("Arms") then
currentcamera.Arms:PivotTo(currentcamera.CFrame)
end
end)
I really do not know what way I should go around this, so anything insightful would be appreciated, thank you!