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

Is it possible to have parts that only collide with the player?

Asked by 8 years ago

I was wondering if it was possible to have parts that only collide with the player. I'm not asking for a script or anything it's just I want to know if anyone has done it, or something similar.

I really need this feature for my game and I don't have any lead on it, so any info would help. A wiki link or a model would be most helpful.

0
Yes. evaera 8028 — 8y

2 answers

Log in to vote
1
Answered by
Unlimitus 120
8 years ago

Local parts. Place the parts in the camera from a local script. This will make all parts only visible and collidable to the player.

0
Unlimitus, well my problem is the part is colliding with local parts. So maybe If i put a camera within the camera that would work? 1nubcaik 62 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

ahem, place this inside the brick, this may or may not work... :P also the brick will have to be extemely thick! (i dunno if it works :P)

local touching = false

    part.Touched:connect(function(hit)
        touching = true
        repeat until part.TouchEnded:wait() == hit
        touching = false
wait (0.1)
    end)

if touching true then
wait(0.1)
script.Parent.CanColide = true
elseif touching false then
script.Parent.CanColide = false
end

Answer this question