Basically I have different teams with car spawners and I want it to where only certain teams can open each proximity prompt, so how would I do that?
COMMUNITY QUESTION
How do you make it to where only certain teams can use proximity prompts?
1 answer
Put this on a ProximityPrompt
local Player = game:GetService("Players").Player1
local Team = game:GetService("Teams")["No Team"]
script.Parent.Triggered:Connect(function()
if Player.Team == Team then
-- your code here
end
end)
I havent try it yet so... Just comment if you find a problem :P
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Add a conditional statement checking the Player-triggering's Team.
I am new to scripting and stuff so I do not know what you mean