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

Previous Thread :: Next Thread 
Francisl4d45 is not online. Francisl4d45
Joined: 14 Aug 2010
Total Posts: 347
12 Apr 2016 10:25 AM
When I fire this event, in my other server script, the part should be deleted, but it deletes the player instead. Why is that?

--Local script:

workspace.Events.ItemDelete:FireServer(part)



--Server Script

workspace.Events.ItemDelete.OnServerEvent:connect(function(item)
print("part deleted "..item.Name)
item:remove()
end)
Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37142
12 Apr 2016 11:00 AM
FireServer passes the player as the argument, no matter what you call it

"part" refers to your player.

workspace.Events.ItemDelete:FireServer(player, part)


-Salinas con el número 23
Report Abuse
Francisl4d45 is not online. Francisl4d45
Joined: 14 Aug 2010
Total Posts: 347
12 Apr 2016 11:30 AM
Thank you! Btw does the RemoteEvent has to be in workspace? I want to make a RemoteEvent for every player.
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
12 Apr 2016 11:30 AM
why would you need a remoteevent for every player?
you can already identify the player via the first argument.
Report Abuse
Francisl4d45 is not online. Francisl4d45
Joined: 14 Aug 2010
Total Posts: 347
12 Apr 2016 12:02 PM
What if a lot of players use the same RemoteEvent? is it only one event at a time or the opposite?
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
12 Apr 2016 12:03 PM
local re = game.ReplicatedStorage:WaitForChild("RemoteEvent")

you can use any ammount of things with just one re.


Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37142
12 Apr 2016 12:11 PM
I use one remoteevent for all players, but just for one specific function.


-Salinas con el número 23
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