Hello! I have implemented a menu system in my game that utilizes a CameraPart for its CFrame. When a player clicks the “Deploy” button, the camera switches over to the custom CameraType, and this functionality appears to be working properly.
However, I have noticed an issue where if multiple players are in the menu at the same time and one of them clicks “Deploy,” it affects everyone’s camera. Despite checking the Developer Console, no errors are being reported, so it’s unclear what could be causing this problem.
Don’t worry about the music and all that.
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local Info = Player.PlayerGui:WaitForChild("Info"):WaitForChild("Open")
local Info2 = Player.PlayerGui:WaitForChild("Info"):WaitForChild("Main")
local CoinShop = Player.PlayerGui:WaitForChild("CoinShop"):WaitForChild("Open")
local CoinShop2 = Player.PlayerGui:WaitForChild("CoinShop"):WaitForChild("Main")
local Coins = Player.PlayerGui:WaitForChild("CoinHolder"):WaitForChild("CoinFrame")
local SkinShop = Player.PlayerGui:WaitForChild("SkinShop")
local Buttons = SkinShop:WaitForChild("Buttons")
local GamepassFrame = SkinShop:WaitForChild("GamepassesFrame")
local Skin = SkinShop:WaitForChild("Skin")
local ShopClose = SkinShop:WaitForChild("Close")
local ShopOpen = SkinShop:WaitForChild("Open")
local Music = script.Music
local GameMusic = script.GameMusic
local DeploySound = script.Deploy
local DeploySound2 = script.Deploy2
local DeploySound3 = script.Deploy3
repeat wait() until Player.Character
Camera.CameraType = "Scriptable"
Camera.CFrame = game.Workspace.CameraPart.CFrame
local blurryscreen = game.ReplicatedStorage:WaitForChild("BlurryScreen")
local blurryscreenClone = blurryscreen:Clone()
blurryscreenClone.Parent = game.Lighting
CoinShop.Visible = true
Info.Visible = true
Coins.Visible = true
ShopOpen.Visible = true
script.Parent.Parent.Enabled = true
GameMusic.Looped = false
GameMusic.Playing = false
GameMusic.Volume = 0.017
wait(0.1)
GameMusic.Volume = 0
wait(0.3)
Music.Looped = true
Music.Playing = true
Music.Volume = 0.1
wait(0.25)
Music.Volume = 0.2
wait(0.25)
Music.Volume = 0.3
wait(0.25)
Music.Volume = 0.4
local function click()
wait(0.1)
script.Parent.Parent.Enabled = false
game.Lighting:WaitForChild("BlurryScreen"):Destroy()
Buttons.Visible = false
CoinShop2.Visible = false
CoinShop.Visible = false
Info2.Visible = false
Info.Visible = false
Info2.Visible = false
Info.Visible = false
Coins.Visible = false
ShopOpen.Visible = false
ShopClose.Visible = false
GamepassFrame.Visible = false
Skin.Visible = false
Camera.CameraType = "Custom"
Music.Volume = 0.4
wait(0.05)
Music.Volume = 0.3
wait(0.05)
Music.Volume = 0.2
wait(0.05)
Music.Volume = 0.1
wait(0.05)
Music.Volume = 0
Music.Looped = false
Music.Playing = false
DeploySound:Play()
DeploySound2:Play()
DeploySound3:Play()
wait(0.2)
GameMusic.Looped = true
GameMusic.Playing = true
GameMusic.Volume = 0.017
wait(0.1)
GameMusic.Volume = 0.035
end
script.Parent.MouseButton1Click:Connect(click)
Thanks for reading!