Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a player spawn laying down?

As the title states, I'm trying to make it to where the player is laying down when they spawn. I'm not exactly requesting a script be made for it, but I'm curious how I'd go about this.

As of now, I'm guessing I'll have to use a PlayerAdded event to trigger it at first, then some sort of Cframe to angle them correctly (or maybe a form of TranslateBy?). However, this is where my knowledge stops, and I'm not quite sure where to go from here.

Thank you for reading, and I look forward to any help possible!

1 answer

✓ Accepted answer

Well, there are two things that I would try. First, I would do this:

game.Players.PlayerAdded:connect(function(player)
	player.Character.Humanoid.PlatformStand = true
end)

This toggles the "PlatformStand" property of a humanoid, which is often used to "trip" players or make them fall.

The second option is to use a rotation, which would be something like this:

game.Players.PlayerAdded:connect(function(player)
	torso = player.Character.Torso
	torso.CFrame = torso.CFrame * CFrame.fromEulerAnglesXYZ(90, 0, 0)
end)

I'm not exactly sure if those are the right numbers, I always play around with CFrame.fromEulerAngles() a bit before getting it right.

Hope this helps, or at least gets you further to figuring it out!

2 comments

0

Hmm, PlatformStand isn't quite working for what I needed (with the legs flailing about wildly and whatnot), but that did actually solve another unrelated issue I've been having! As for the second option, it's just what I needed; and I'll agree, remembering CFrame angles is near impossible. Thank you for the help!

0

torso.CFrame = torso.CFrame * CFrame.Angles(0, 180, 0) I believe.

This discussion is preserved as it was. New answers, comments, and votes are closed.