So I am making a script and I want it so that the script targets all players and makes it so that other players can walk through them. Heres the script

--defining all players should be char

function onChatted(msg, recipient, speaker) 

-- convert to all lower case 

local source = string.lower(speaker.Name) 
msg = string.lower(msg) 

local char = (head,torso,legs, everything)
if (msg == "TPlayersE") then 
char.CanCollide = false 
end 
if (msg == "TPlayersD") then 
char.CanCollide = false 
end 

function onPlayerEntered(newPlayer) 
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) 
end 

game.Players.ChildAdded:connect(onPlayerEntered) 

I am for 1 not sure how to make it so players can walk through other players. Essantally they can't go through objects but they can go through other players and I want to know how I would define it so all players become that.

2 comments

0

You can set all of the parts of the players' cancollide to false and the collision will still work.

0

thats not waht I am looking for but I will keep it in mind