Endorsed Weapons kit camera fix [FIXED CAMERA]

Hello everyone!

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

99 Likes

I would recommend putting this in #resources:community-resources / #resources:community-tutorials

7 Likes

thank you kid sir! I have been trying to figure this out for a while now :slight_smile:

6 Likes

I’m glad that I’ve helped you and thank you!

3 Likes

You’re a Good Man. Thank you :+1:

2 Likes

Weird, it doesn’t work for me :confused:

No it didn’t work for me either unfortunately.

1 Like

This works, I’ve confirmed it:

It’s not an ideal fix though because this one has third person locked when you equip the weapon.

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.

1 Like

Yea I really don’t understand why Roblox locked it to third person.

It’s because the gun kit is supposed to be used to battle royale games, i’m pretty sure it was made for a battle royale game tutorial on the wiki.

1 Like

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.

  1. Make a LocalScript in StarterPlayer > StarterCharacerScripts
  2. 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)
13 Likes

I found a different way to fix this (haven’t tested it fully but should work)

  1. Step one is the same so remove line 185
  2. Go to line 369 and add the line below to the if not equipped statement

WeaponsSystem.camera:setEnabled(false)

  1. Then go to line 378 and add the line below the if equipped statement

WeaponsSystem.camera:setEnabled(true)

2 Likes

I’ve encountered the following issues:

  1. Player walkspeed not restored on unequip
  2. On player death, camera not restored to Custom (remains locked over the shoulder)
  3. 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)
1 Like

I didn’t see the post below before i replied. maybe this is commonly known now (among those using the weapons kit).

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.

Roblox Weapons Kit Fix - Resources / Community Resources - Developer Forum | Roblox

Roblox Weapon Kit Fix

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!!!