So in my game I have been using the FPS kit made by roblox, where there is a module script for a shoulder camera that is always active in-game. However, when I made a GUI, the cursor is locked to the character, making it impossible to interact with the GUI. Is there a way to disable the shoulder camera until the player has chosen a team?
Here is the location of the GUI and its properties.
Here is the location of the shouldercamera script.
The code from the “ClientWeaponsScript”, which I suspect is the thing that calls the modulescript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local playerChildAddedConnection
local replicatedStorageChildAddedConnection
local clientWeaponsScript
local weaponsSystemFolder
local function setupWeaponsSystem()
local WeaponsSystem = require(weaponsSystemFolder.WeaponsSystem)
if not WeaponsSystem.doingSetup and not WeaponsSystem.didSetup then
WeaponsSystem.setup()
end
end
local function onReplicatedStorageChildAdded(child)
if child.Name == "WeaponsSystem" then
setupWeaponsSystem()
replicatedStorageChildAddedConnection:Disconnect()
end
end
local function onPlayerChildAdded(child)
if child.Name == "PlayerScripts" then
clientWeaponsScript.Parent = child
playerChildAddedConnection:Disconnect()
end
end
if script.Parent.Name ~= "PlayerScripts" then
clientWeaponsScript = script:Clone()
local PlayerScripts = script.Parent.Parent:FindFirstChild("PlayerScripts")
if PlayerScripts ~= nil then
clientWeaponsScript.Parent = PlayerScripts
else
playerChildAddedConnection = script.Parent.Parent.ChildAdded:Connect(onPlayerChildAdded)
end
else
weaponsSystemFolder = ReplicatedStorage:FindFirstChild("WeaponsSystem")
if weaponsSystemFolder ~= nil then
setupWeaponsSystem()
else
replicatedStorageChildAddedConnection = ReplicatedStorage.ChildAdded:Connect(onReplicatedStorageChildAdded)
end
end
I’ve tried using a function for the event, but to no avail. Would appreciate any help, as I’ve been stuck with this for quite a while.