I have created script that changes anchor of part to false, and makes this part fall on floor. but, after 3 secounds i want same part to return to its defaut position.
i want script to check position of part before it falls on the ground, to make it return on its defaut position, but i dont know how to check position of part by using script.
-- not working script
local PartPosition = script.Parent.Position
script.Parent.Touched:Connect(function() wait(1) script.Parent.Anchored = false wait(3) script.Parent.Position = PartPosition
end)
And yeah, sorry for bad english
i think it does but since the position youre giving to the part is the same because partposition is the position of the same part
do smth like local position = "original position of the part here"
script.Parent.Touched:Connect(function() wait(1) script.Parent.Anchored = false wait(3) script.Parent.Position = position
end)
You Can Create A New Part With The Same Position As The Part Your Making It Fall. So Make Starter Position Invisible, Uncollidable And Anchored. And The Just Do This Code:
local StartPos = [your starter pos start namethingy] script.Parent.Touched:Connect(function() wait(1) script.Parent.Anchored = false wait(3) script.Parent.Position = StartPos end)