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: explain remotefunction and remoteevent for me

Previous Thread :: Next Thread 
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
01 Dec 2015 02:14 PM
I don't get what the wiki says


I eat waffles
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
01 Dec 2015 02:16 PM
What to explain...? other than the name being pretty much self-explantory
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
01 Dec 2015 02:17 PM
client fires to server, server reacts how it's programmed to
remoteevent just sends information to the server, remotefunction can return a value back to the client, albeit's a little more strenuous as far as latency's concerned, so try to avoid it if it's not absolutely necessary. not that it's bad, just not something you want to fire once a frame lol

-=Robo=-
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
01 Dec 2015 02:17 PM
^&vice-versa
client can receive data sent from the server and can return values back

-=Robo=-
Report Abuse
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
01 Dec 2015 02:19 PM
so this part in wiki

"-- Inside Server Script
local event = Instance.new("RemoteEvent") -- creates the event object
event.Parent = game.Workspace -- puts the event into the Workspace
event.Name = "MyServerEvent" -- giving a name to the event so we can fire it specifically elsewhere
event.OnServerEvent:connect(function() -- define the function that will be called when the event is fired
-- this is where you put all the code you want to run when the event is fired
game.Workspace.Baseplate.BrickColor = BrickColor.Random()
end)
The corresponding Local Script for this event is very simple: it simply sets up the click detector to fire the event on click (note it assumes a Part in the game called ColorBrick):

-- Inside Local Script
local clickDetector = Instance.new("ClickDetector")
clickDetector.Parent = game.Workspace.ColorBrick
clickDetector.MouseClick:connect(function(hit)
game.Workspace.MyServerEvent:FireServer()
end)

Putting this code in a game will have the baseplate change to a random color every time a player clicks on a part using a RemoteEvent called MyServerEvent. Note that the name that you give the event can be anything you like, but it is important that it is unique. If you give two remote events the same name only one event will be handled when the event is fired."

I get how the local script works but I don't get how to remote event works.


I eat waffles
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
01 Dec 2015 02:20 PM
.OnServerEvent fires when the client sends data to the server. It's no different than any standard event.

-=Robo=-
Report Abuse
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
01 Dec 2015 02:20 PM
nvm.... I didn't see the text "Fire"


I eat waffles
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
01 Dec 2015 02:21 PM
robocu3 explained it well but for a really good example to make it better to understand.

RemoteEvent: Telling someone something and then ending the conversation
RemoteFunction: Asking someone for something and getting an answer in return, conversation ends
Report Abuse
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
01 Dec 2015 02:22 PM
in the arguments it says tuple arguments and player. What r tuple arugments


I eat waffles
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
01 Dec 2015 02:25 PM
i don't know the definition word for word, it pretty much means you can pass almost any value to it and it'll be sent to the server/client, and the parameters passed can be abundant, for example

:FireServer(1, 2, 3, 4, 5,6,7,8,90,2,2422,23424,64574748487, "testies
") --+1000 other numbers, don't do this though lol

-=Robo=-
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
01 Dec 2015 02:27 PM
@robocu3, your last argument ;-;

Can't help myself to point it out
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
01 Dec 2015 02:27 PM
lol

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