I was planning on using Roblox’s Weapon Kit into my game as it works fine and isn’t that bad.
My Question Is:
Can I modify this kit so that the shoulder camera isn’t constantly set how it is below and fix the mouse lock?
Ideally I want it to be third person where you can shoot with your cursor, and then players can do first person or shift lock/mouse lock if they want to as well.
I have found other posts on here and tutorial videos but all are outdated as far as I am aware.
I have tried messing with this but I am not that great at scripting so I didn’t get very far.
If anyone knows anything I could do to achieve this with the Roblox Weapon Kit, any help is appreciated!
(Or… Would I be better off just using a different system for weapons or having someone make something for me?)
put a local script into the pistol
local ReplicatedStorage = game.ReplicatedStorage
local WeaponsSystem = ReplicatedStorage:WaitForChild("WeaponsSystem")
local weaponModule = require(WeaponsSystem:WaitForChild("WeaponsSystem"))
local camera = workspace.Camera
local player = game.Players.LocalPlayer
script.Parent.Equipped:Connect(function()
weaponModule.camera:setEnabled(true)
weaponModule.camera.rotateCharacterWithCamera = true
end)
script.Parent.Unequipped:Connect(function()
weaponModule.camera:setEnabled(false)
weaponModule.camera.rotateCharacterWithCamera = false
camera.CameraSubject = player.Character
weaponModule.normalOffset = Vector3.new(0, 0, 0)
end)
This just turns on the camera when equipped and turns off when unequipped