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: How to use RemoteEvents?

Previous Thread :: Next Thread 
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
20 Jun 2016 08:37 PM
I have read a tutorial on ROBLOX Wiki but it doesn't work, am I doing it wrong?

http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial
Report Abuse
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
20 Jun 2016 08:38 PM
If you can explain RemoteFunction too that would be great.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
20 Jun 2016 08:40 PM
local re = game.ReplicatedStorage:WaitForChild("RemoteEvent")

re.OnServerEvent:connect(function(plr,msg) --the player will always be the first arg
print(msg)
re:FireClient(plr,"Hello!")
end)

local re = game.ReplicatedStorage:WaitForChild("RemoteEvent")

re:FireServer("Hi!")

re.OnClientEvent:connect(function(msg)
print(msg)
end)

Output:

Hi!
Hello!


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
20 Jun 2016 08:42 PM
the top is a server script and the bottom code is in a local script sorry.

RemoteFunctions operate thesame but are events that yield until there is data that is returned. Remote Events don't yield


Report Abuse
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
21 Jun 2016 01:03 PM
Okay, thanks. The layout is the same as the wiki says. :D
Report Abuse
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
21 Jun 2016 01:09 PM
Wait, the code doesn't work for me. I added a RemoteEvent inside the ReplicatedStorage.

Is there a specific place where the scripts should be?
Report Abuse
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
21 Jun 2016 01:34 PM
Never mind, I had to watch youtube to figure it out. xD (I like reading wikis.)
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