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: If filtering is enabled...

Previous Thread :: Next Thread 
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
07 Aug 2015 12:52 PM
Then can you not use a server script with playerentered to edit a players GUIs? Do you have to do remote events and do invokeclient?
Report Abuse
ByDefault is not online. ByDefault
Joined: 25 Jul 2014
Total Posts: 3197
07 Aug 2015 12:53 PM
I think all FilteringEnabled does is make it so the server can't edit the client and vice versa
Report Abuse
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
07 Aug 2015 12:55 PM
You should use RemoteFunctions and RemoteEvents when dealing with client/server communication with FE.

This is also due to the fact that the server can't see any chances that the client does since FE prevents client-to-server replication.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
07 Aug 2015 12:55 PM
Ah, so to edit the client I have to use invokeclient, correct?
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
07 Aug 2015 12:56 PM
unless if your screengui is created via the server script, and parented to the playergui (don't do this though), then no, you won't be able to access the contents of their playergui.

just do it client-sided
Report Abuse
BobserLuck is not online. BobserLuck
Joined: 09 Mar 2012
Total Posts: 653
07 Aug 2015 12:57 PM
yep
Report Abuse
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
07 Aug 2015 12:58 PM
"just do it client-sided"

The PlayerAdded event can't be run from the client.
It has to be ran from a regular script.
Report Abuse
BobserLuck is not online. BobserLuck
Joined: 09 Mar 2012
Total Posts: 653
07 Aug 2015 01:00 PM
Yes but you can create the remote function from the server script when playeradded is fired and then in a local script, simply wait for child and then OnServerInvoke.
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
07 Aug 2015 01:01 PM
-- server script

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

game.Players.PlayerAdded:connect(function(plr)
re:FireClient(plr, yourGui)
end)

-- local script

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

re.OnClientEvent:connect(function(gui)
gui:Clone().Parent = game.Players.LocalPlayer.PlayerGui
end)

try that?
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
07 Aug 2015 01:01 PM
""just do it client-sided"

The PlayerAdded event can't be run from the client.
It has to be ran from a regular script."

i was implying that he simply clones it from replicated storage into the local player's playergui

wotevr
Report Abuse
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
07 Aug 2015 01:05 PM
Using a RemoteEvent/ RemoteFunction to communicate with the client is more efficient than constantly cloning and replacing every players GUI.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
07 Aug 2015 01:06 PM
Would I be able to usde DataStores in a localscript? Just getasync, not setasync. If so I can move the script to clientside, but otherwise I need to do remote events.
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
07 Aug 2015 01:07 PM
you can't access datastores from a local script m8
Report Abuse
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
07 Aug 2015 01:08 PM
@lit, Datastores can only be accessed through server scripts.

You are going to have to use RemoteFunctions for that.
Also, make sure you don't use a module script to do it.
Modules are used from whatever is 'requiring' it.
So if a localscript uses a module scripts 'GetAsync' function, it'll still run on the client and won't work.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
07 Aug 2015 01:09 PM
Alright, thank you all. Its the first time I'm using filtering enabled, so I'm a total noob at it lol.
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