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

How do I make a brick walk-through? [closed]

Asked by 10 years ago

Locked by User#2

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

Why was this question closed?

4 answers

Log in to vote
4
Answered by 10 years ago

Just untick the 'CanCollide' property in the properties of the part.

Ad
Log in to vote
0
Answered by 10 years ago

It should look a little like this for an open/close door

local Door = script.Parent --The Part that we are touching
function onTouch(Brick) --Sends a message to the brick that it was touched
    local Player = Brick.Parent:findFirstChild("Humanoid") --Searches for a human
    if(Player ~= nil) then --If there is a human then..
            Door.CanCollide = false --Door opens
            Door.Transparency = 1 Door is see through
            Door.BrickColor = BrickColor.new(math.random(), math.random(), math.random()) --Changes colour, just a little fun thing if you want it
            wait(1.5) --Waits 1 1/2 seconds before it closes
            Door.CanCollide = true --closes
            Door.Transparency = 0 --Door is normal again
    end
end
Door.Touched:connect(onTouch) --Connects to the onTouch script.
Log in to vote
-1
Answered by 10 years ago

Put this in a script in the part.

while true do
    script.Parent.CanCollide = false
    wait(10) -- So it doesn't crash
end
0
Maliux, look what I just did. Grenaderade 525 — 10y
Log in to vote
-1
Answered by
Maliux 0
10 years ago

This is a Website for scripting help not Building help.

0
Yeah Tesouro 407 — 10y