I tried doing this with all the part in the players but they didn't pass through the parts. help ;3
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.
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.
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.
This is one of the noclip scripts i know. You don't fly with it. Its just a walk-through:
local noclip = true -- Gets if you want the noclip char = game.Players.LocalPlayer.Character -- Gets your player while true do -- Make sure someone is in game if noclip == true then for _,v in pairs(char:children()) do pcall(function() if v.className == "Part" then v.CanCollide = false end end) end end game:service("RunService").Stepped:wait() end
Make sure that script is local! Note: Sometimes it breaks if you use it in kohl's admin/script builder
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?