Ive been trying to make a team change gui, where when you first join the game you are looking over a baseplate, due to camera manipulation. Then when you change the team, you spawn with the normal roblox camera and no camera manipulation. That second part does not work. The issue is that when I join a team my camera is not following the player- I cant even see the player on the screen. Here are the scripts
-- Camera
local TeamChoose = script.Parent.Parent
local confirm = script.Parent.Parent.Teamchange.Frame.Light.Button --Select button
local confirm2 = script.Parent.Parent.Teamchange.Frame.Dark.TextButton --Select button
local Camera = game.Workspace.CurrentCamera
local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
Camera.CameraType = "Scriptable"
Camera.CFrame = game.Workspace.CamPart.CFrame
confirm.MouseButton1Click:Connect(function()
Camera.CameraType = "Custom"
game.Workspace.CamPart:Destroy()
end)
confirm2.MouseButton1Click:Connect(function()
Camera.CameraType = "Custom"
game.Workspace.CamPart:Destroy()
end)
And the team change (there are two of these, one for each team)
local Camera = game.Workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local player = script.Parent.Parent.Parent.Parent.Parent
local TeamChoose = script.Parent.Parent
local confirm = script.Parent.Button
local confirm2 = script.Parent.Parent.Dark.TextButton
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Button.Visible = false
script.Parent.Parent.Light.Button.Visible = true
end)
script.Parent.Button.MouseButton1Click:Connect(function()
player.Team = game.Teams.Light
TeamChoose:TweenPosition(UDim2.new(0.25, -0,-1, -0),"Out","Quint",1,true)
player.Character.Humanoid.Health = 0
end)
Thanks in advance

3 comments
changing camera subject prevents the part from getting destroyed when you reswitch teams
Thanks guys! Just about to try this out!
I think I changed it, but it still doesn't work. Maybe check this script below?