I tried making my own script. But it din't work. :( My script is:
-- This is a local script!
local playerService = game:GetService("Players")
local TEAMS = game:GetService("Teams")
local localPlayer = playerService.LocalPlayer
script.Parent.Touched:Connect(function(hit)
if hit == localPlayer then
if localPlayer.team == TEAMS:FindFirstChild("A team name") or TEAMS:FindFirstChild("Another team name") or TEAMS:FindFirstChild("High Level") then -- The team names are right.
script.Parent.CanCollide = false
wait(0.5)
script.Parent.CanCollide = true
else
print("Not a allowed in!")
end
else
print("Something went wrong. ¯\(°_o)/¯")
end
end)
If you can either help me correct the script or give me something to read/script, please help me. - Toby

2 comments
Take a look at how "OR" conditionals work also, the localPlayer you defined is a player instance. when comparing hit you want to use the players character.
I see an error on line 08. You're saying if hit is the same as the player when the player is an object in Players and the Character which would be touching the part is in Workspace. So try something like if hit.Parent.Name == localPlayer.Name then -- Do stuff end