So, I am trying to make something check if you are a team but its not working it keeps saying that I am not on the team but I am, Could anyone help?
local players = game:GetService("Players") local Teams = game:GetService("Teams") script.Parent.Attachment.ProximityPrompt.Triggered:Connect(function(player) if player.Team == Teams.engineer then script.Parent.Transparency = 0 script.Parent.Attachment.ProximityPrompt.MaxActivationDistance = 0 else print("Not on team") end end)
I hopped into studio and messed around with it. What I've done to get this to work is the following
workspace.Part.ProximityPrompt.Triggered:Connect(function(player) print('Within distance') if (player.Team == game:GetService('Teams'):FindFirstChild('Engineer')) then print('woohoo!') else print('Not on team.') end end)