#Roblox Weapon Kit Camera stays zoomed in after death
1 messages · Page 1 of 1 (latest)
this is the fix i added in all the guns
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)
Can anyone help me
your changing the camera type and subject after death
Yo accept
why
I have a question pls