I tried with citizen team and that worked and then I switched to the police team but then it still says I am not a police.
Here is the localscript:
local player = game.Players.LocalPlayer
local gui = player:FindFirstChild("PlayerGui"):FindFirstChild("CarUI")
local button = gui:FindFirstChild("ButtonsFram"):FindFirstChild("CopCar")
local CivCarFrame = gui:FindFirstChild("CivCarsFrame")
local CopCarFrame = gui:FindFirstChild("CopCarsFrame")
open = true
button.MouseButton1Click:connect(function()
if player.TeamColor == "Cyan" then
CivCarFrame.Visible = false
CopCarFrame.Visible = true
else
button.Text = "You are not police!"
wait(2)
button.Text = "Police Cars"
end
end)

1 comment
Thanks so much for your help! :D