generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Not working under Filtering..?

Previous Thread :: Next Thread 
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
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
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
02 May 2015 02:28 PM
b1
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
02 May 2015 04:41 PM
b2
Report Abuse
imalex4 is not online. 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
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
02 May 2015 09:02 PM
That didn't really help. Anyone else?
Report Abuse
peoplemove12 is not online. peoplemove12
Joined: 11 Feb 2010
Total Posts: 1442
02 May 2015 11:30 PM
b3
Report Abuse
GhostSailor is not online. GhostSailor
Joined: 02 Jul 2010
Total Posts: 1913
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image