So this is my script function onTouch(hit) local vaultdoor = Workspace.Vaultdoor local newPos = Part.Position + Vector3.new(-2.35,5.65,-28.4) local Time = 10 local Increment = 0.5 local Debounce = false
local Diff = newPos - vaultdoor.Position local Mag = Diff.magnitude local Direction = CFrame.new(Part.Position, newPos).lookVector
function MovePart() if Debounce then return end Debounce = true for n = 0, Mag, Increment do Part.CFrame = Part.CFrame + (Direction * Increment) wait( (Time/Mag) * Increment ) end Debounce = false end Im trying to get it to open a Vault door and i want it to slide open the door but instead the script does nothing ( Has to be ontouch script
Thanks - Kaboom

3 comments
Use Code Blocks please, it is the dark blue/purple circle in the editor.
What do you mean?
where it says lua click that and put the code in the ~~~~~~~~`