I tried a bunch of different ways but no matter what I try CanCollide
always goes off for all the players is there a way to make it just one player?
local h1 = game.Workspace.Kingdom.Hidden1 local h2 = game.Workspace.Kingdom.Hidden2 function onTouch(hit) if hit.Parent:findFirstChild("Humanoid") then h1.CanCollide = false h2.CanCollide = false end end game.Workspace.Kingdom.Carpet.Touched:connect(onTouch)
One trick to make a part CanCollide
for only one player is to turn on FilteringEnabled, something roblox made to prevent hacking. To enabled this feature click Workspace
in the explorer and enabled FilteringEnabled
. Then set CanCollide
to false in a Local Script
of that player.
Just remember that enabling FilteringEnabled, it may interfere with other scripts in your game that don't use remote events or remote functions to communicate with the server and client.