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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|