Here's my problem.
I have a part named BARISTADOOR, and a Local Script named BARISTADOORSCRIPT.
(The Local Script is in the part.)
This is the code that is in the Local Script.
game.Workspace.BARISTADOOR.Touched:Connect(function(hit)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player then
if player:GetRankInGroup(5370359) >= 12 then
game.Workspace.BARISTADOOR.CanCollide = false
end
end
end)
Whenever a player touches the part, I need it to do,
if player:GetRankInGroup(5370359) >= 12 then
game.Workspace.BARISTADOOR.CanCollide = false`
end
Only for the client that touched te part.
But it's not doing anything when I touch it.
Can someone explain why this does not work?
Thank you.

1 comment
Thank you for your help! <3