hello robloxians,
i am working on a team select ui and when i just checked the ui so the camera cant change by click to “fixed camera” sombody can tell me why?
here is the script:
local player = game.Players.LocalPlayer
script.Parent.POB.MouseButton1Click:Connect(function()
player.Team = game.Teams.Police
script.Parent.Parent.Visible = false
repeat wait(0.5)
game.Workspace.Camera.CameraType = Enum.CameraType.Fixed
until game.Workspace.Camera.CameraType == Enum.CameraType.Fixed
end)
script.Parent.EVB.MouseButton1Click:Connect(function()
player.Team = game.Teams.Evil
script.Parent.Parent.Visible = false
repeat wait(0.5)
game.Workspace.Camera.CameraType = Enum.CameraType.Fixed
until game.Workspace.Camera.CameraType == Enum.CameraType.Fixed
end)
script.Parent.PRB.MouseButton1Click:Connect(function()
player.Team = game.Teams.Prisoner
script.Parent.Parent.Visible = false
repeat wait(0.5)
game.Workspace.Camera.CameraType = Enum.CameraType.Fixed
until game.Workspace.Camera.CameraType == Enum.CameraType.Fixed
end)