i'm trying to create a puzzle for my roblox horror game, in this puzzle you need to push a block onto a button to activate a door. i'm an absolute noob at scripting so i have no clue what coding i would need for this! i've tried methods, but none of them have worked so far.
Put this script in your button (remember to set the names where i tell you too):
local blockName = "name" --Replace the name part with whatever the name of the block you have to push is local door = game.Workspace. --Write the rest of this directory to indicate the door script.Parent.Touched:Connect(function(part) if part.Name == blockName then door.CanCollide = false door.Transparency = 1 end end)
Feel free to ask me to improve the terrible code that was written in 2 minutes or less idk lol