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

How do I make players stay on spining platforms? ( answered )

Asked by 5 years ago
Edited 4 years ago

After doing some research I found the most efficient way of doing this is with cylinder constraints. here is a free model which you can use in your games and play with which shows off a platform which keeps players on it. ( This platform actually uses no scripts so that's why there is none listed )

https://web.roblox.com/library/4991184804/Advanced-Spining-platform

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Well this was fun (and amusing) to work on, and it may be a little cheaty but it works!

Here ya go:

01local Spin_Part =script.Parent--The part
02local Spin_Pos =Spin_Part.Position
03local Can =true
04 
05local function Rotate(State,Hit_Model)
06    while Hit_Model.Humanoid.Jump ==false do--You jump (hold jump) to get off. A bit jumpy but it works, so...
07        wait()
08        Hit_Model:SetPrimaryPartCFrame(Spin_Part.CFrame)--RoTaTe!
09    end
10    Hit_Model.PrimaryPart =Hit_Model.HumanoidRootPart
11    Hit_Model.RoPart:Destroy()
12    wait(0.2)--Attempt #2 to stop "floating"
13    Can =true
14end
15 
View all 37 lines...

Just put this script alone into your part, and it'll take care of the rest. No editing is needed for part positions, It will adapt to the part you put it in!

I'm not sure if it'll work with more then one player, but it will work with anything containing a part named "HumanoidRootPart" and a Humanoid! (inside a Model)

So you can rotate custom made boxes and stuff.

Enjoy!

remember to mark this as the solution if it works

0
Thanks that helps a lot not exactlly what I had in mind but works just fine... If there is two players then only the first player is connected to the script and the other doesn't it shouldn't be a big issue though robloxian_colby 22 — 5y
0
Ya, I didn't make it to work with more then one player, but I'm glad it was able to get you on the right track. mbramblet 80 — 5y
0
Just wondering would it be possible to make the primary part for the player on the same rotaion pattren as the platfrom so players can move around with the primary part inside them connecting them to the location of the platform? robloxian_colby 22 — 5y
0
That's what I tried to do, but the closest I got in the amount of time I had was what I shared above. I might be able to find a better way with more time, but I don't have any rightnow. Sorry. I'll look into it again sometime later if I can. mbramblet 80 — 5y
0
ok I'll try and figure it out myself don't have much faith in my abbility but I can always try also thanks for all your help robloxian_colby 22 — 5y
Ad

Answer this question