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: Filtering Enabled, need help with remote event

Previous Thread :: Next Thread 
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:14 AM
I'm trying to re-code my game with FE. First time attempting this, have some questions:



>in a regular script:

game.Workspace.Event.OnServerEvent:connect(function()
game.Players.Player1.Character.Head:Remove()
end)

>in a local script:

wait(1)
game.Workspace.Event:FireServer()



..So, my question:

I have a main game script, with different functions coded that do different things (ex. teleport a player, make a brick in workspace, give a player a tool from replicatedstorage, etc.)

I'm trying to replace these functions with remote events so I can use FE and prevent exploiting. I'm just wondering, how, exactly, to go about it? Like, where should I put the regular script with all the game functions, and where should I put the local script (which I want to have run my game with the fireserver()s, aka the main game script)


So what am I doing wrong here?




Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:20 AM
So many thanks to whoever is kind enough to lend me insight. I've been reading over the wiki articles for a very long time, and running tests to try and figure this out.


Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 12:26 AM
don't give too much power to the clients, do most of it serverside, if possible try to limit the things a client can do by using remote events, if somebody gets a level 7 they can use the remote events to do things


Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 12:28 AM
i can't give you much help with script organization because i haven't had much experience in it myself, but what i said above really is important


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:31 AM
Note sure what a level 7 is.

I just don't know how to re code my game with these. I mean, a function before FE in a regular that would teleport all players to certain locations.

How would I use a remote event to do the same thing, via server-side?


(I don't want every player to run the main game script..)


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:32 AM
inn a regular script***


Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 12:35 AM
if the game script is on the server and that's what teleports players, you don't need a remote event for that


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:35 AM
but when I turn on FE, it no longer works?


Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 12:36 AM
things that are triggered buy the client such as shooting a gun or clicking a button to buy an item from a shop need remote events to fire the server and have the server handle that


Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 12:37 AM
the characters of players are stored serverside on fe so all you need to do is have the gamescript teleport the characters


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:38 AM
Alright, so here's a piece of my script basically:

Works w/o FE, but it is ignored (doesn't do anything) with FE turned on (this is in a regular script in workspace)


for _,v in pairs(game.Players:GetChildren()) do
v.Character:MoveTo(location in workspace)
end


Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 12:41 AM
for _,v in pairs(game.Players:GetChildren()) do
if v.Character then
v.Character:MoveTo(location in workspace)
end
end

try that and if it doesn't work i need to see more of the code i think


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:42 AM
My actual code is fine, that is not my issue, just didn't post everything to simplify things.

So, that should work?

I'm going to test it real quick on a seperate game with nothing in it.


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:45 AM
Also- Can I create instances with a regular script in workspace with FE on ?


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 12:51 AM
Thank you for the help.




Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 12:56 AM
yes, you can


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 01:07 AM
Can I also manipulate the gui of players through the script?


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 01:09 AM
That is client side, so I'm assuming that is when I would have to use remote events n such


Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
11 Jul 2016 01:10 AM
no, you would have to fire the event with a listener on the client to do that, but there's different ways to do this more efficiently, if you want help i'm not the one you should ask


Report Abuse
DylanBuildar is not online. DylanBuildar
Joined: 14 Jun 2008
Total Posts: 20782
11 Jul 2016 01:12 AM
I was thinking that. Thanks though, most stuff comes quickly but for this you really need someone to walk you through it.


Report Abuse
njesk12 is not online. njesk12
Joined: 21 Aug 2012
Total Posts: 65
11 Jul 2016 01:29 AM
When wanting to organize what scripts have what power, just remember, anything that you want the client only to see, such as GUI stuff or wanting to know when the client causes an action (i.e. clicks their mouse), then that would be in the local script. Anything else that you want everyone in the server to see or "feel", or that changes the atmosphere of the server itself, you want to use a global script. Also, as long as the remote event itself is in the Workspace, the global script can be virtually everywhere. I personally prefer it being in the "ServerScriptService", but it's your organization style.

One more thing, sometimes you may want changes in the server to happen, but that only the client can see. Then you would use a local script but that's another story. Not something you really should focus on for now.

If you need any further help, make sure to refer to the ROBLOX Wiki page, which has a fascinating library of references for help, or ask here. Another place to ask would be at scriptinghelpers.org (a ROBLOX help site that sits on the side)
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