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 switch between anchored and not anchored?

Asked by 10 years ago

I want to know how to change a block from being anchored (stays in place) to not anchored (falls down) when a specific block touches it.

1 answer

Log in to vote
1
Answered by
Dummiez 360 Moderation Voter
10 years ago

Use the Touched event.

local part = script.Parent
part.Touched:connect(function(hit)
    if (hit.Name == "SpecificBrick") then -- A 'SpecificBrick' hit the part!
        part.Anchored = false
    end
end)
Ad

Answer this question