I made a script so that a block gets unanchored after you touch it, so it falls down from a tall height, now how do I make it so that it comes back as it is in the same position?
Clone it before it's properties are changed then clone the clone into Workspace.
I'm going to use example variables since I don't what the variables of your brick are.
local Position = Origin.Position Origin = script.Parent local Lighting = game.GetService('Lighting') new=Origin:clone new.Parent = Lighting local debounce = false function anchor(v) if Origin.Anchored = true then Origin.Anchored = false end function onTouched(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") if humanoid~=nil and debounce == false then debounce = true debounce = false end end wait(24) new.Parent = Workspace new.Position = Position return script.Parent.Touched:connect(onTouched)
That should work, but message me if it doesn't.
This might help. http://wiki.roblox.com/index.php?title=Instantiation_of_a_part
Closed as Not Constructive by iluvmaths1123, Perci1, and TheMyrco
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?