How is this happening?? D:
Asked by
Qorm 100
10 years ago
I'm trying to prevent this from happening, but I got NO CLUE of what's going on here... Take a look:
03 | Raiders = game.Teams.Raiders |
05 | c = game.Workspace.CurrentCamera |
07 | player = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Character) |
09 | if player.TeamColor = = BrickColor.new( "Really black" ) then |
10 | script.Parent.Parent.PlayerGui.SelectSide.Main.Visible = true |
11 | script.Parent.Parent.Character.Torso.Anchored = true |
12 | c = game.Workspace.Camera |
13 | c.CameraType = "Scriptable" |
14 | target = game.Workspace.Cameramodel.Position |
15 | while true and wait() do |
16 | c.CoordinateFrame = CFrame.new(target)*CFrame.Angles( 0 ,angle, 0 ) |
17 | angle = angle+math.rad( 0.1 ) |
20 | if player.TeamColor = = BrickColor.new( "Bright red" ) then |
22 | script.Parent.Parent.PlayerGui.SelectSide.Main.Visible = false |
23 | script.Parent.Parent.Character.Torso.Anchored = false |
25 | target = script.Parent.Parent.Character.Head.Position |
26 | c.CoordinateFrame = CFrame.new(target) |
28 | elseif player.TeamColor = = BrickColor.new( "Pastel yellow" ) then |
30 | script.Parent.Parent.PlayerGui.SelectSide.Main.Visible = false |
31 | script.Parent.Parent.Character.Torso.Anchored = false |
33 | target = script.Parent.Parent.Character.Head.Position |
34 | c.CoordinateFrame = CFrame.new(target) |
What it does is it LOCKS the target camera at the place it started off as when you die. I have a GUI with a script that you choose sides from to die, and switch to one of this teams. HELP WOULD BE APPRECIATED!!