generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help!!

Previous Thread :: Next Thread 
1234andrewh is not online. 1234andrewh
Joined: 21 Apr 2012
Total Posts: 459
14 Apr 2013 12:52 PM
this script works but only for the first player that enters the game
and i dont know how to fix it so that it does it for all players
please help

game.Players.PlayerAdded:connect(function(ply)
ply.CharacterAdded:connect(function(char)
Instance.new("BodyForce", char.Torso).force = Vector3.new(0,2500,0)
end)
end)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
14 Apr 2013 12:52 PM
That's odd...Are you testing in play-solo?
Report Abuse
1234andrewh is not online. 1234andrewh
Joined: 21 Apr 2012
Total Posts: 459
14 Apr 2013 12:56 PM
no im testing in online mode with a freind
Report Abuse
1234andrewh is not online. 1234andrewh
Joined: 21 Apr 2012
Total Posts: 459
14 Apr 2013 12:58 PM
the orginal script that didn't work was this

function makeLowGrav(torso)
print("Low grav", torso)
local b = Instance.new("BodyForce")
b.Name = "LowGrav"
b.force = Vector3.new(0,2500,0)
b.Parent = torso
end

function onPlayerRespawn(property, player)

if property == "Character" and player.Character ~= nil then
makeLowGrav(player.Character.Torso)
end
end




function onPlayerEntered(newPlayer)
while true do
if newPlayer.Character ~= nil then break end
wait(5)
end

newPlayer.Changed:connect(function(property) onPlayerRespawn(property, newPlayer) end )

makeLowGrav(newPlayer.Character.Torso)
end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image