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

Player never stays on rotating part?

Asked by 5 years ago

I want a player to stay on a rotating part instead of them falling off, how do I do this?

1 answer

Log in to vote
0
Answered by
oftenz 367 Moderation Voter
5 years ago
Edited 5 years ago

You can easily do this yourself using welds.

--If filtering enabled is on then this should be a script with a Touched event.
--If filtering enabled is disabled then leave this as a localscript

part = Instance.new("Part", workspace)
weld = Instance.new("Weld", part)
local humanoid = Player.Character:WaitForChild("Humanoid")

  if (humanoid.RigType == Enum.HumanoidRigType.R15) then
        weld.Part0 = Player.Character["LeftFoot"]
        weld.Part1 = part
      elseif (humanoid.RigType == Enum.HumanoidRigType.R6) then
            weld.Part0 = Player.Character["Left Leg"]
        weld.Part1 = part
      end

Let me know if this works well. I'm pretty interested and I haven't actually tested yet.

0
@oftenz I'm a bit confused with your script. It seems like it would only work with one body part and it also looks like it doesn't function well with R15. HimoutoUmaruDomaChan 20 — 5y
0
Here I'll update it but it's the same for R15 oftenz 367 — 5y
0
I'll test it out tomorrow, do I have to rename any parts or just put the script into the part and it will work smoothly? HimoutoUmaruDomaChan 20 — 5y
0
No you can edit the script. Change part to your part that is rotating. oftenz 367 — 5y
Ad

Answer this question