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 » Scripters
Home Search
 

Re: RemoteEvent Firing for only some people

Previous Thread :: Next Thread 
Skydric is not online. Skydric
Joined: 20 May 2008
Total Posts: 8026
13 Oct 2016 06:31 PM
clientevent script:
players = game.Players
game.Players.PlayerAdded:connect(function(player)
player.CharacterAppearanceLoaded:connect(function()
local event = Instance.new("RemoteEvent")
event.Parent = player
event.Name = "Intro"
wait(0.01)
event:FireClient(player)
end)
end)
I'm going to be safe in assuming that the root of the issue of the script not firing on all entering individuals is here.
What am I doing wrong for it to only fire the event for some people and not others?
Report Abuse
RoyStanford is online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
13 Oct 2016 06:39 PM
It is likely that this is fired before the client script has had a chance to declare the connection. It looks like this could all be done client side if it's just an intro script.
Report Abuse
Skydric is not online. Skydric
Joined: 20 May 2008
Total Posts: 8026
13 Oct 2016 06:41 PM
.playeradded doesn't want to work in a localscript so i had to use a remoteevent

it's not a regular gui intro either so idk
Report Abuse
cabbler is not online. cabbler
Joined: 19 Jun 2015
Total Posts: 735
13 Oct 2016 06:42 PM
^^^ but if you need a remoteevent you can use only one rather than putting one inside all players
Report Abuse
RoyStanford is online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
13 Oct 2016 06:42 PM
Yeah but all LocalScripts naturally start when the player enters the game, so why bother using the PlayerAdded event if you're just going to fire the intro event immediately?
Report Abuse
Skydric is not online. Skydric
Joined: 20 May 2008
Total Posts: 8026
13 Oct 2016 06:44 PM
this script is in workspace in a regular script lol
it's not in every person
Report Abuse
killerbot29003 is not online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
13 Oct 2016 06:45 PM
You know, you can just create o̲n̲e̲ RemoteEvent and put it in ReplicatedStorage. When the player joins, call :FireClient(player) on the remoteevent (obviously) and the player as the argument, and base the localscript off that single remoteevent. Much easier than creating separate ones for each player which could cause problems.



This siggy is copyrighted ©
Report Abuse
Skydric is not online. Skydric
Joined: 20 May 2008
Total Posts: 8026
13 Oct 2016 06:45 PM
@stanford

i need to wait until the character is added as well, because i end up cloning the player's model as part of the 'intro scene'.

therefore it is necessary to wait for the character to load

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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