ok so, im looking to make a script that has if you touch the brick, it will unanchor and fall over.
i am very new to scripting :( so i dont know how to unanchor with scripts.
Someone kind of beat me to this. But this script is different:
local Part = script.Parent -- defining the part Part.Touched:Connect(function(hit) -- Function activates when being touched. -- hit is the thing that touched the part if game.Players:GetPlayerFromCharacter(hit.Parent) then -- Checks to see if player touched the part Part.Anchored = false -- sets Boolean value of anchored of part -- to false end end)
Part.Anchored = true
Create a Script and place it inside the part, then write this code inside. I also recommend reading the Wiki page about Anchoring Parts, and Properties in general.
local Part = script.Parent -- Referencing the part Part.Touched:Connect(function() -- When the part is Touched then Part.Anchored = false -- Set the Part's anchored property to false end)