Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-3

How to make the player Anti CanCollide? [closed]

Asked by
DrGloo -2
11 years ago

I tried doing this with all the part in the players but they didn't pass through the parts. help ;3

0
Why not just make the parts CanCollide? User#2 0 — 11y
0
I did it did not work DrGloo -2 — 11y
0
Are you sure the part was CanCollide false (unchecked)? User#2 0 — 11y
0
Easy just open explorer and properties, Click the brick you want that you want people to walk through or not to on the properties of the brick slide down until you see Can-collide, tick that box or untick it what ever you want it :) Hope this helped Soulzs 0 — 10y

Locked by Thewsomeguy and Articulating

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

3 answers

Log in to vote
1
Answered by
MunimR 125
11 years ago

This is an unfortunate problem with Humanoids...

Humanoids make sure that Torso/HumanoidRootPart and Head are always Can-Collidable, only way around is to remove Humanoid then re-register controls or have a loop setting the Can-Collide property to false.

Ad
Log in to vote
0
Answered by 11 years ago

Why don't you make the parts that the player touched NonCanCollideable.

And if you don't want some parts to be able to be unCanCollided, then just lock them.

Put this chunk of code in a LocalScript in a client-sided service like the StarterPack or StarterGui.

local player = game.Players.LocalPlayer

function Touched(hit)
if hit.Locked == false then
hit.CanCollide = false
end
end

function TouchEnded(hit)
if hit.Locked == false then
hit.CanCollide = true
end
end

player.CharacterAdded:connect(function(character)
character.Head.Touched:connect(Touched)
character.Head.TouchEnded:connect(TouchEnded)
character.Torso.Touched:connect(Touched)
character.Torso.TouchEnded:connect(TouchEnded)
character["Left arm"].Touched:connect(Touched)
character["Left arm"].TouchEnded:connect(TouchEnded)
character["Right arm"].Touched:connect(Touched)
character["Right arm"].TouchEnded:connect(TouchEnded)
character["Left leg"].Touched:connect(Touched)
character["Left leg"].TouchEnded:connect(TouchEnded)
character["Right leg"].Touched:connect(Touched)
character["Right leg"].TouchEnded:connect(TouchEnded)
end)

Not sure if the second word in the name of the arms and legs are supposed to be capitalized but eh. You can try this if you want.

Log in to vote
0
Answered by
hiccup111 231 Moderation Voter
10 years ago

This is basically a Ghost script, i.e. to walk through walls.

local script

player = game.Players.LocalPlayer
char = player.Character

while wait() do
    for _,v in pairs(char:GetChildren()) do
        if v:IsA("BasePart") then v.CanCollide = false end
    end
end

That's basically what you need.