Hey Developers,
So for my story game, the players are supposed to be dead; I mean they won’t actually die; their characters will just be on the floor. I need to make something like this:
(credit to
@ItsMuneeeb)
I’m currently using this:
for _, Player in pairs(game.Players:GetPlayers()) do
if Player.Name == SurvivingPlayer.Name then
for _, DeadSpot in pairs(game.Workspace.DeadPlayerSpots:GetChildren()) do
if DeadSpot.Taken.Value == false then
Player.Character.LowerTorso.Anchored = true
Player.Character.HumanoidRootPart.CFrame = DeadSpot.CFrame
Player.Character.Humanoid.JumpPower = 0
break
end
end
end
end
However, the player’s animations still work, and they don’t even go on the floor. They just stand upright. How could I make it so that they lie down and their animations get disabled like in the picture above?
2 Likes
Would a death animation work? You could animate the players dying then have them still on the floor for as long as you need them too. I’m still learning Studio so this is just something I think might work.
2 Likes
There is a property called platform stand in the humanoid, try changing that.
2 Likes
No, I’m making it so that the lights go out, and then one player survives, he turns the lights on and then the players are on the floor. However, they shouldn’t be dead; I don’t mean they shouldn’t off. Basically they should be able to see, their health won’t change, all that will happen is that they should be lying down like in the picture in the topic.
1 Like
To disable movement you can do
local Controller = require(game.Players.LocalPlayer.PlayerScript s.PlayerModule)
Controller:Disable()
To enable do:
Controller:Enable()
3 Likes
Alright, thanks for that. But how can I make it so that the player goes on the ground?
No, I’m making it so that the lights go out, and then one player survives, he turns the lights on and then the players are on the floor. However, they shouldn’t be dead ; I don’t mean they shouldn’t off. Basically they should be able to see, their health won’t change, all that will happen is that they should be lying down like in the picture in the topic.
What I’m talking about is an animation that looks like the players are dying, and then they’ll be lying there for however long you need them too.
It doesn’t need to for an animation.
So you mean i should animate it?
Just make an animation of then lying down and set the looped property to true.
That’s exactly what I’m saying. Dead people can’t move, so you’ll only have to animate one pose.
Exactly. Disable the movement with my method above. And loop an animation of the player laying on the ground.
Isn’t that just a visual of the player getting killed? Won’t they just respawn after a certain number of seconds?
If that is the case then that script won’t work. He wants the players laying on the ground simulating that their dead.
I agree with @blazeswipe. The player’s health bar should not be changed at all, they just need to lie down with no movement to let the players know that they’re dead. There needn’t be a death animation, just a looped one-posed animation.
Yes. If that is how you want your animation to look.
Yes, you could! If the players die in the pitch dark, then no further animation is needed.
Edit: I would recommend you spread the arms and legs out to make it look a bit more realistic. If you have spare time, you could make more poses so that it looks like each player died in a different pose. This is kind of a weird phrase, but no two people die the same!
1 Like
So the final method should be to disable the movement with the method I provided way above in another post. And to make them lie down should be to loop an animation of them lying down.
Again to disable the movement.
@blazeswipe @99guineafowl Once I’ve got the animation ID, I’ve published it to my group, How can I make it loop? The animation doesn’t need to unloop as after this the story is finished. So they don’t need to be able to stand up again. I’m guessing i could fire an event to stop the player movement and use the script @blazeswipe provided, but how could I make the animation loop with the ID?
You could just copy the ID into an animation object in your workspace and loop the animation from that animation object.
And make sure you stop movement on the server because exploiters will exploit things on the client.