Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My "if then statement" doesnt work?

bin = script.Parent
function anchor(object) object.Anchored = true end
function onTouched(part) anchor(part) end
bin.Touched:connect(onTouched)

is this right? Also i'm try to make a brick unanchor when touched.

1 answer

It's correct, but make the bricks "Anchored" property set to false. Like this:

bin = script.Parent

function anchor(object)
object.Anchored = false --"Un-Anchors" the object
end

function onTouched(part) 
anchor(part) 
end

bin.Touched:connect(onTouched)

This discussion is preserved as it was. New answers, comments, and votes are closed.