Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How would I make a part slide? Not, teleport from one place to another.. but to slide?

Asked by 9 years ago

I only know a teleport script. I never knew how to make it slide and I don't know where to start. Help? At least start me off?

1 answer

Log in to vote
3
Answered by 9 years ago

This can easily be accomplished with a BodyPosition!! It will smoothly move your part to a desired Position! (Vector3 of course!) Here is a simple script in which you can modify yourself. I put notes to give you a better understanding of what each property does!

--The Following properties are all defaults! Modify to your will!
--Place the script into the part you want to slide!
bp = Instance.new("BodyPosition")--Creates a new BodyPosition!
bp.Parent = script.Parent--this is where the BodyPosition will be stored!
bp.position = Vector3.new(0,10,0)-- change this to the position you want the part to slide to!
bp.maxForce = Vector3.new(4000, 4000, 4000)--a Limit to how much power it should have!
bp.D = 1250--How much dampening the object has before it reaches the desired position
bp.P = 10000--Sets how aggresive the part will try to get to the position!

Hope this helps!

0
Thank you. I like it when people explain things so then I'll have a better understanding of scripting. james24dj 90 — 9y
0
No problem! minikitkat 687 — 9y
Ad

Answer this question