Lately I have been researching this weapon kit. I have seen that there is a problem with camera because it’s always locked in third person, and I have decided to fix it.
Basically when you equip the gun camera locks and when you unequip the gun it returns to normal camera.
Steps on how to do it:
First Step
Find a ModuleScript called WeaponsSystem and delete line 185
Second Step
Create a LocalScript inside a tool
Third Step
Put this code inside your LocalScript that you have created.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local WeaponsSystem = ReplicatedStorage:WaitForChild("WeaponsSystem")
local weaponModule = require(WeaponsSystem:WaitForChild("WeaponsSystem"))
local weaponGui = require(WeaponsSystem.Libraries.WeaponsGui)
local camera = workspace.Camera
local player = game:GetService("Players").LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
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)
Humanoid.Died:Connect(function()
if Character:FindFirstChild(script.Parent.Name) then
player.PlayerGui:FindFirstChild("WeaponsSystemGui"):Destroy()
weaponModule.gui = weaponGui.new(WeaponsSystem)
weaponModule.camera:setEnabled(false)
weaponModule.camera.rotateCharacterWithCamera = false
camera.CameraType = Enum.CameraType.Custom
camera.CameraSubject = player.Character
weaponModule.normalOffset = Vector3.new(0,0,0)
end
end)
UPDATE
Fixed camera on player’s death while having a weapon equipped
If it’s not working then you can contact me on discord tradertiger or message me here on devforum
That’s right, unfortunately there is (according to my research) not really an easy solution to this issue, as third-person is hardcoded into the source. Hopefully someone will make a good solution in the future or an update will be made to the weapon kit.
I found an Issue when you respawn after you get killed with this modification.
The camera does not reset to focusing on the player.
her is a quick fix for it.
Make a LocalScript in StarterPlayer > StarterCharacerScripts
local ReplicatedStorage = game:GetService("ReplicatedStorage") local WeaponsSystem = ReplicatedStorage:WaitForChild("WeaponsSystem") local weaponModule = require(WeaponsSystem:WaitForChild("WeaponsSystem")) local camera = workspace.Camera weaponModule.camera:setEnabled(false) weaponModule.camera.rotateCharacterWithCamera = false camera.CameraSubject = script.Parent weaponModule.normalOffset = Vector3.new(0,0,0)
On player death, camera not restored to Custom (remains locked over the shoulder)
On player death, crosshairs not removed
I’ve fixed (2) and (3) locally, but likely others have also, and (of course) i can’t be certain of the robustness of my (albeit minor) changes.
There should be a better way to maintain this (useful) kit.
self.eventConnections.humanoidDied = self.currentHumanoid.Died:Connect(function()
print( script.Name, ": owner died: disabling ShoulderCamera" ) -- Robru3142 2023-08-23 camera not restored to Custom on player death
self:setEnabled( false ) -- Robru3142 2023-08-23
self.zoomedFromInput = false
self:updateZoomState()
self.weaponsSystem.gui:setCrosshairEnabled( false ) -- Robru3142 2023-08-23 crosshairs not removed on player death
end)
I know this is an old post but I feel like you should’ve done this in the modules. The point of the Weapons Kit being in OOP is so that there aren’t any scripts in the actual guns themselves and somebody else was able to actually do it in modules.
I know I may sound like a baby crying about this but I just like to give my opinion out.
A way to make it even better is to have a configuration bool value set for whether you want to have the camera or not like that. Again just my stupid opinion pls dont get mad
Edit: I didn’t read the fact that other people brought this up and now sound stupid
This is an old post, but I made a complete fix Free Model of which also keeps the OOP of the original kit intact. It fixes some of the other issues mentioned in this thread (of course the camera issue), and other issues not mentioned here.
I usually don’t respond just to respond… but I have been looking for this since Roblox released their weapons kit. The camera lock was just annoying. Thank you!!!