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: Only works in Studio, not in Server

Previous Thread :: Next Thread 
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 09:36 PM
Ok, so I'm trying to make this dialog FireClient in the player. It works successfully on studio, but when I test it in the server, it says LocalEvents becomes nil. Even when I add waitforchild, the script just stops working, please help.

local Dialog = script.Parent
local DialogEvent = Dialog:WaitForChild("DialogEvent")
DialogEvent.OnServerEvent:connect(function(Player, Choice)
if (Choice == Yes) then
Player.leaderstats.Career.Value = "Blue Noob"
Player.PlayerGui.LocalEvents.JoinedBlueNoobs:FireClient(Player)

end)
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 10:10 PM
*Coughs*
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 10:19 PM
*Coughs Coughs*
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 10:23 PM
*Coughs Coughs Coughs*
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 10:26 PM
*Coughs Coughs Coughs Coughs*
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 10:29 PM
*Coughs Coughs Coughs Coughs Coughs*
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 10:32 PM
*Coughs Coughs Coughs Coughs Coughs Coughs*
Report Abuse
15fluffblox is not online. 15fluffblox
Joined: 04 Jul 2010
Total Posts: 426
25 Jun 2016 10:37 PM
Is this script in a local script? or a regular script?
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 10:56 PM
This is in a regular script, since it's a dialog for NPCs.
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 11:48 PM
*COUGHS*
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
25 Jun 2016 11:51 PM
Put a print statement directly below the connection to the event. After you do that, go into your game in a live server. Make the event fire and then tell me if it printed it or not.
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
25 Jun 2016 11:55 PM
It errors because the event can't reach to connect and FireClient.
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
26 Jun 2016 12:01 AM
I don't really understand what you just said but w/e. The issue is somewhere below.

- You're missing an end (for the if statement)
- That event can only be connected to via a local script if FE is on.
- 'Yes' is probably a variable that you didn't show us but just in case it isn't, the returned choice is the location of the dialog that was selected,
- Don't put the RemoteEvent in the player. Instead, put the event in the ReplicatedStorage (which can be accessed locally).
Report Abuse
classy_chap is not online. classy_chap
Joined: 14 Mar 2009
Total Posts: 338
26 Jun 2016 12:14 AM
Nobody should help you. You're being impatient and rude and think you're entitled to get free help RIGHT this instant.


Report Abuse
sharpchain1 is not online. sharpchain1
Joined: 05 Aug 2013
Total Posts: 1009
26 Jun 2016 12:59 AM
Tip for the future: Test the majority of things in your in a test server


Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
26 Jun 2016 02:47 AM
Ok, I'll put event in replicatedsroragge, thanks
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