|
| 02 May 2015 12:23 PM |
Why doesn't this code work with FilteringEnabled? It works when you join the game, then when you die and respawn, it doesn't work anymore.
~~~~~~~~~~~~~~~~~ repeat wait() until game:GetService("Players").LocalPlayer
local Player = game:GetService("Players").LocalPlayer local Character = Player.Character or Player.CharacterAdded:wait() local ReplicatedStorage = game:GetService("ReplicatedStorage") local Timer = ReplicatedStorage:WaitForChild("Timer") local MapHolder = workspace:WaitForChild("MapHolder") local SelectedMap = ReplicatedStorage:WaitForChild("SelectedMap") local Playing = Player:WaitForChild("Playing")
local CurrentCamera = workspace.CurrentCamera
Angle = 0 while wait() do if Timer.Value > 0 and Playing.Value == false and Character:FindFirstChild("Humanoid") and Character:FindFirstChild("Humanoid").Health > 0 then CurrentCamera.CameraSubject = MapHolder:FindFirstChild(SelectedMap.Value):FindFirstChild("PartCAM") CurrentCamera.CoordinateFrame = CFrame.new(MapHolder:FindFirstChild(SelectedMap.Value):FindFirstChild("PartCAM").Position) * CFrame.Angles(0, Angle, 0) * CFrame.new(0, 0, -25) elseif Timer.Value < 0 and Playing.Value == false and Character:FindFirstChild("Humanoid") and Character:FindFirstChild("Humanoid").Health > 0 then CurrentCamera.CoordinateFrame = CFrame.new(workspace.Scene:FindFirstChild("PartCAM").Position) * CFrame.Angles(0, Angle, 0) * CFrame.new(0, 0, -10) CurrentCamera.CameraSubject = workspace.Scene:FindFirstChild("PartCAM") elseif Timer.Value > 0 and Playing.Value == true and Character:FindFirstChild("Humanoid") and Character:FindFirstChild("Humanoid").Health > 0 then CurrentCamera.CameraSubject = Character:FindFirstChild("Humanoid") end Angle = Angle + math.rad(0.5) end ~~~~~~~~~~~~~~~~~
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
imalex4
|
  |
| Joined: 16 Aug 2012 |
| Total Posts: 48 |
|
|
| 02 May 2015 04:43 PM |
| http://wiki.roblox.com/index.php?title=API:Class/Workspace/FilteringEnabled |
|
|
| Report Abuse |
|
|
|
| 02 May 2015 09:02 PM |
| That didn't really help. Anyone else? |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 May 2015 12:12 AM |
You set Character once, when they spawn the first time, and when they die, they get a new character, and you don't update the reference.
Lord of all things, breaded and unbreaded. |
|
|
| Report Abuse |
|
|