**What would I learn to have a door slide up when it is touched. ** I know the Touched event, just dont know what CFrame
COMMUNITY QUESTION
I need help on a CFrame Sliding script?
1 answer
To CFrame something upward, you can do this:
door.CFrame = door.CFrame*CFrame.new(0,1,0)
That will move a part up one stud. Making the one into a negative one will make it move downward. If you want to give the effect of a door sliding upward, this code will slide it upward twenty studs.
for i=1,200 do
door.CFrame = door.CFrame*CFrame.new(0,.1,0)
wait()
end
Again, making the number in the CFrame negative will make it slide downward.
Now you can use that to make a sliding gate. Just remember to add debounce while the door is sliding.
This discussion is preserved as it was. New answers, comments, and votes are closed.
