That is definitely not the issue.
Script
local player = game.Players.LocalPlayer
local Player = player
Player:GetPropertyChangedSignal("TeamColor"):Connect(function()
if game.Players.LocalPlayer.TeamColor == BrickColor.new("Really red") then
player.CameraMaxZoomDistance = 0.5
player.CameraMinZoomDistance = 0.5
else
player.CameraMaxZoomDistance = 130
player.CameraMinZoomDistance = 0.5
end
end)
Proof that it is working
Oh my god, I forgot to add the “else” part, that’s probably the issue but we’ll see.
Are you automatically assigned to the red team or did you also change your character to be on red team?
Changed the Character Team Color by adding this in the Command bar
Go to → View → Press the Command bar and Paste this code
game.Players.LocalPlayer.TeamColor = BrickColor.new("Really red")
If you are testing in Roblox Type in the chat “/Console” and Go to the Server and paste the same code.
It did not work in either of those, and this is what it said in the console.
However, it did team me to the red team.
I’ve found the Issue.
Name your Team that you want to Change “Contestants” for now and Paste this code.
local player = game.Players.LocalPlayer
local Player = player
Player:GetPropertyChangedSignal("Team"):Connect(function()
if game.Players.LocalPlayer.Team == game.Teams.Contestants then
player.CameraMaxZoomDistance = 0.5
player.CameraMinZoomDistance = 0.5
else
player.CameraMaxZoomDistance = 130
player.CameraMinZoomDistance = 0.5
end
end)
It still only teams me to the red team but does not force me into first person. Also, how will I know that this works with other players?
I’ve decided I’m just going to make a new game and try and paste the game into it.
Try this.
local player = game.Players.LocalPlayer
local Player = player
Player:GetPropertyChangedSignal("Team"):Connect(function()
if game.Players.LocalPlayer.Team == game.Teams["Contestants/Celebrities"] then
player.CameraMaxZoomDistance = 0.5
player.CameraMinZoomDistance = 0.5
else
player.CameraMaxZoomDistance = 130
player.CameraMinZoomDistance = 0.5
end
end)
Trying it into a new game and copying the exact script you wrote previously did not work either.
This means something.
Did you try this?
Make sure it’s a LOCAL script
local player = game.Players.LocalPlayer
player:GetPropertyChangedSignal("Team"):Connect(function()
if game.Players.LocalPlayer.Team == game.Teams["Contestants/Celebrities"] then
player.CameraMaxZoomDistance = 0.5
player.CameraMinZoomDistance = 0.5
else
player.CameraMaxZoomDistance = 130
player.CameraMinZoomDistance = 0.5
end
end)
Not this either. I’m really thinking that making a new game is much more efficient.
Is the script you are using a Local Script or a Server script?
It’s even a local script and it doesn’t work.
New warning in the console as well. Doesn’t work in a new game either.
this script should work perfectly fine, to change the team color try, game.Players.SentorAmery250 instead of game.Players.LocalPlayer, in the console / command bar.
All that does is team me onto the red team like usual. I’ll show video proof in a second.
Use this Script please not the TeamColor one and do as @msix29 have said.
Script
local player = game.Players.LocalPlayer
player:GetPropertyChangedSignal("Team"):Connect(function()
if game.Players.LocalPlayer.Team == game.Teams["Contestants/Celebrities"] then
player.CameraMaxZoomDistance = 0.5
player.CameraMinZoomDistance = 0.5
else
player.CameraMaxZoomDistance = 130
player.CameraMinZoomDistance = 0.5
end
end)
The Command
game.Players.SentorAmery250.Team = game.Teams["Contestants/Celebrities"]
local players = game:GetService("Players")
local player = players.LocalPlayer
player:GetPropertyChangedSignal("Team"):Connect(function()
if player.Team == game.Teams["Contestants/Celebrities"] then
player.CameraMode = Enum.CameraMode.LockFirstPerson
else
player.CameraMode = Enum.CameraMode.Classic
player.CameraMinZoomDistance = 12
task.wait()
player.CameraMinZoomDistance = .5
end
end)
This did not work, I’m going to use their script now.