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: remoteevents/functions

Previous Thread :: Next Thread 
LlamaKiddo is not online. LlamaKiddo
Joined: 26 Dec 2014
Total Posts: 1135
26 Nov 2017 09:29 AM
what is the difference? how do i use functions and events? the wiki wasnt helping and ive watched alot of tutorials on youtube
Report Abuse
ExtremeBuilder15 is online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
26 Nov 2017 09:33 AM
RemoteEvents and RemoteFunctions are basically custom objects for communication between the client and server (local scripts and normal scripts).

A RemoteEvent is just like any other event (onClicked, PlayerAdded, etc.), but you both fire it and connect a function to it. RemoteEvents are used to allow the client to tell the server something, or vice-versa, in a FE environment.

A RemoteFunction is a lot like a remote event, but you can get a return value from it like a normal function.

If you're having a lot of trouble, you might need to back track a bit and do some easier stuff (green tutorials).

Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
26 Nov 2017 09:36 AM
Watch this and you should understand it assuming you have decent knowledge of this language.

https://www.youtube.com/watch?v=4Dc_bri9mjs


Report Abuse
LlamaKiddo is not online. LlamaKiddo
Joined: 26 Dec 2014
Total Posts: 1135
26 Nov 2017 09:39 AM
@Extreme Thanks! I have one question. When I fire a remoteevent from a local script can I do it like this?

game:GetService("ReplicatedStorage").RemoteEvent.FireServer

inside a function with a normal event?

Like this:

game.Workspace.Part.Changed:Connect(function()
game:GetService("ReplicatedStorage").RemoteEvent.FireServer
end)
Report Abuse
chexyalani is online. chexyalani
Joined: 26 Mar 2017
Total Posts: 694
26 Nov 2017 09:44 AM
it's game.ReplicatedStorage.RemoteEvent:FireServer()
Report Abuse
LlamaKiddo is not online. LlamaKiddo
Joined: 26 Dec 2014
Total Posts: 1135
26 Nov 2017 09:47 AM
@chex Oops, forgot.
Report Abuse
LlamaKiddo is not online. LlamaKiddo
Joined: 26 Dec 2014
Total Posts: 1135
26 Nov 2017 09:53 AM
I get how I use RemoteEvents atleast now, but how do I make it fire when something happens instead of firing when the server starts running? My guess is that you have to create a normal function in the localscript/serverscript and in the function you make it fire the remoteevent. Can I just do that?
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