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

turn down gravity on death?

game:GetService('Players').PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character:WaitForChild("Humanoid").Died:Connect(function()
			workspace.gravity "10"
		end)
-- my script

so eh when i put it in it wont work how do i make it work

2 comments

0

First of all, doing this from the server is basically useless... Second... Do it from client duh.. third.. workspace.gravity is meant to be workspace.Gravity.... fourth, you are missing ends, fifth, you gotta elaborate on your question...

0

like dur you you should duh elaborate on yer dur list of uhh answers duh

2 answers

✓ Accepted answer

Alright, I got it working, basically you have to do script.Parent.Gravity, instead of workspace.gravity, also you missed some ends. Make sure this is a normal script inside of Workspace. You got it all right, except some minor errors, I tested this and it changes the gravity to 10 when you die. Here is the code:

game:GetService('Players').PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        character:WaitForChild("Humanoid").Died:Connect(function()
            script.Parent.Gravity = 10
end)
end)
end)

Hopefully this worked/helped!

try this

game.Players.PlayerAdded:connect(function(player)
local humanoid = player.character:WaitForChild("Humanoid")
humanoid.died:connect(function()
script.Parent.Gravity = 10
end)
end)

put it in workspace. this is a awnser that may not be used much but is simple, short and eazily editable.

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