Hello, I am a beginner scripter, Im making a murder mystery type game and im using a ragdoll script i got off the creator store, I have a lobby that the players spawn in before they are teleported to the map, how do i make it so the script doesn’t activate when the players are inside the lobby so they have the usual break apart death, but ragdoll death when they are teleported to the map if thats even possible? Any help would be appreciated, Thank you.
debounce per player.
char limit
Yes thats definitly possible what you’ll likely want to do is create a part that covers the entire lobby which is anchored, transparent and can collide = false. Then create an if statement inside the ragdoll script which basically checks to see if the player is currently touching the lobby part or not.
It should come off the back of your script that handles people being inside the game or in the lobby. This way you can tell if they are in the lobby or not without relying on some part.
This being said, I really think it would be beneficial if you learned the basics of coding and work your way up from there.
You could add a check for the player’s death.
For example, you could create a BoolValue named activeGame = false. When the round has started set this variable to true, and when it has ended set it to false. It could be located within a folder, etc.
If you have a ragdoll script in your startercharacterscripts, when a humanoid is detected as dead add an if statement for if activeGame = true.
--located in StarterCharacterScripts
local activeGame = game.ReplicatedStorage:WaitForChild("activeGame")--your BoolValue
local humanoid = script.Parent:WaitForChild("Humanoid")
humanoid.Died:Connect(function()
if activeGame then--aciveGame's default value = false
--ragdoll logic
end
end)