Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Why won't this team Camera script work?

Asked by 9 years ago
game.Players.PlayerAdded:connect(function(p)
--p is the player lold
if p.TeamColor==game.Teams['Lobby'].TeamColor then


game.StarterPlayer.CameraMaxZoomDistance=15--Original was 400
game.StarterPlayer.CameraMinZoomDistance=0.5--Make this a Script!

-- or this way

game.StarterPlayer.CameraMode="Camera"

--Lobby stuff here
p.Changed:connect(function(val)
if val=='Character' then
if p.Character==nil then repeat wait() until p.Character~=nil end
--This is for when they die...

end
end)
elseif p.TeamColor==game.Teams['Bright green'].TeamColor then

game.StarterPlayer.CameraMaxZoomDistance=0.5--Original was 400
game.StarterPlayer.CameraMinZoomDistance=0.5--Make this a Script!

-- or this way

game.StarterPlayer.CameraMode="LockFirstPerson"
--Non-lobby stuff here

p.Changed:connect(function(val)
if val=='Character' then
if p.Character==nil then repeat wait() until p.Character~=nil end
--This is for when they die...
end
end)
end
end)

For whatever reason it works for the Lobby team but for the Green team it uses the settings from the lobby team.

0
try having them in separate Scripts. woodengop 1134 — 9y
0
Still does the same thing Nathan123 -5 — 9y
0
instead of using Elseif try, Else (have the other teams FPS settings): Use an else woodengop 1134 — 9y
0
Else just creates more errors Nathan123 -5 — 9y
View all comments (2 more)
0
Are you sure the teams actually have different colors? noliCAIKS 210 — 9y
0
Yes Nathan123 -5 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Do you see this in the script?

-- or this way

I think you have to delete the code underneath

-- or this way

I don't know though, I haven't fooled around with the Camera part of Roblox Lua.

Ad

Answer this question