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: Player Enter

Previous Thread :: Next Thread 
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 04:52 AM
Hello, this script doesn't work can anyone fix it?

game.Players.PlayerAdded:connect(function(plyr)
game.Lighting.Part1:Clone().Parent=plyr.Character
game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui
wait(10)
plyr.PlayerGui.PartCon:remove()
game.Lighting.Fix:Clone().Parent=plyr.Character
plyr.Character.Fix:remove()
end)

~Andreas98~
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
17 Oct 2011 04:56 AM
[ Content Deleted ]
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 04:59 AM
Thanks, but still don't work and the scripts that the script clones should work because when I make the script:

plyr=game.Players.andreas98

game.Lighting["Part1"]:Clone().Parent=plyr.Character
game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui
wait(10)
plyr.PlayerGui.PartCon:remove()
game.Lighting.Fix:Clone().Parent=plyr.Character
plyr.Character.Fix:remove()

Then it works.
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
17 Oct 2011 05:02 AM
[ Content Deleted ]
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 05:12 AM
I think they work because if I made the script

game.Players.PlayerAdded:connect(function(plyr)
plyr.Character["Left Leg"]:remove()
end)


Then it still doesn't work.
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
17 Oct 2011 05:31 AM
function onPlayerEntered(player)
Player.Character["Left Leg"]:remove()
end

game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 05:37 AM
Not really what I needed, but now I will read all my script to see if I can find any errors..
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 10:13 AM
I can still not find any errors, any other ideas?
Report Abuse
Diebrox is not online. Diebrox
Joined: 17 Sep 2009
Total Posts: 4716
17 Oct 2011 10:23 AM
Output?
Report Abuse
UttermostExedra is not online. UttermostExedra
Joined: 28 Dec 2009
Total Posts: 2483
17 Oct 2011 10:23 AM
game.Players.PlayerAdded:connect(function(plyr)
plyr.CharacterAdded:connect(function(char)
game.Lighting.Part1:Clone().Parent=char
game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui
game:GetService("Debris"):AddItem(plyr.PlayerGui.PartCon,10)
game.Lighting.Fix:Clone().Parent=char

plyr.Character.Fix:remove() -- [[not sure why you want to remove it when you just cloned it..]]
end)
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 10:46 AM
Its because the "Fix" script edit the camera to the normal view.
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 10:55 AM
Thanks, but it still doesn't work.. Any other ideas?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
17 Oct 2011 11:01 AM
UttermostExedra's script does work..
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
17 Oct 2011 11:01 AM
If you ad and end) to it
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 11:02 AM
Uhmm yes, I know that, but can anything fix it?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
17 Oct 2011 11:03 AM
game.Players.PlayerAdded:connect(function(plyr)
plyr.CharacterAdded:connect(function(char)
game.Lighting.Part1:Clone().Parent=char
game.Lighting.PartCon:Clone().Parent=plyr.PlayerGui
game:GetService("Debris"):AddItem(plyr.PlayerGui.PartCon,10)
game.Lighting.Fix:Clone().Parent=char
plyr.Character.Fix:remove()
end)
end)

?
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 11:11 AM
Still doesn't work, any other ideas?
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
17 Oct 2011 11:12 AM
The most likely issue you're testing in solo, in which the player enters before the script loads. You could fix it by separating the function from the connection and creating a loop that automatically runs the function for players already in the server.
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 11:13 AM
But, I test it in play mode and it only need to be runned when the player enter the game.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
17 Oct 2011 11:15 AM
If the server is already open and a new player opens, does it work then? You should probably add my suggestion anyway as a matter of precaution.
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 11:17 AM
Ill try to get another player to join after I joined, thanks.
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 12:34 PM
I tryed to join while anotherone was in the game, but it still doesn't work. Any other ideas?
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
17 Oct 2011 12:37 PM
It could be that the PlayerGui or the Character hasn't loaded immediately.
Report Abuse
andreas98 is not online. andreas98
Joined: 10 Sep 2008
Total Posts: 246
17 Oct 2011 12:53 PM
But the other player had played the game about 2 min before I joined.
Report Abuse
Spaggetti001 is not online. Spaggetti001
Joined: 13 Oct 2010
Total Posts: 120
17 Oct 2011 12:56 PM
are there another scripts that you used cause sometimes one script can stop another script
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