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
 

Question about FilteringEnabled

Previous Thread :: Next Thread 
God_Xairu is not online. God_Xairu
Joined: 20 Mar 2016
Total Posts: 10
05 May 2016 07:59 PM
I'm trying to make parts appear visible for more than one person, but not all the players. I've tried messing around with it some, and all of said messing around isn't working. Is this even possible to do, and if yes, could someone tell me how I would go about doing this?

I'm not asking for someone to make me a script, I'm just asking on "how I would go about doing this."


i like cake
Report Abuse
regentia is not online. regentia
Joined: 07 Feb 2011
Total Posts: 66
05 May 2016 08:04 PM
you could have a table of players in a local script, if the player isn't in the table than delete the parts in the workspace
Report Abuse
God_Xairu is not online. God_Xairu
Joined: 20 Mar 2016
Total Posts: 10
05 May 2016 08:59 PM
bump1


i like cake
Report Abuse
LuaLlama is not online. LuaLlama
Joined: 25 Jan 2014
Total Posts: 1123
05 May 2016 09:07 PM
Tell the player via RemoteEvents to create a Part/model into workspace.
Report Abuse
Xstarlight is not online. Xstarlight
Joined: 18 Oct 2012
Total Posts: 870
05 May 2016 09:13 PM
My fellow dev used the system "game.Workspace.CurrentCamera" though i believe its much more complicated then that.
Report Abuse
God_Xairu is not online. God_Xairu
Joined: 20 Mar 2016
Total Posts: 10
06 May 2016 01:07 PM
@LuaLlama
I'm trying to have it for certain people, not everyone in the server. Would doing what you said work for that?


i like cake
Report Abuse
War_Force is not online. War_Force
Joined: 15 Apr 2016
Total Posts: 2611
06 May 2016 01:10 PM
Yes, Lua's way will work if done properly.


Report Abuse
God_Xairu is not online. God_Xairu
Joined: 20 Mar 2016
Total Posts: 10
06 May 2016 01:12 PM
War, would you mind elaborating more? I'm looking at the wiki page for RemoteFunctions and RemoteEvents and it doesn't really explain much..


i like cake
Report Abuse
ByDefault is not online. ByDefault
Joined: 25 Jul 2014
Total Posts: 3197
06 May 2016 01:13 PM
local allowedPlayers = {["Player1"] = true,["Player2"] = true}

for i,v in pairs(game.Players:GetChildren()) do
if allowedPlayers[v.Name] then
v.Backpack.ServerToClient:FireClient(v,"RemovePart",workspace.Part)
--A RemoteEvent telling the client to delete the part
end
end

--This part controls the remoteevent
serverToClient.OnClientEvent:connect(function(event,eventInfo)
if event == "RemovePart" then
eventInfo:remove()
end
end)
Report Abuse
War_Force is not online. War_Force
Joined: 15 Apr 2016
Total Posts: 2611
06 May 2016 01:14 PM
http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial


Report Abuse
War_Force is not online. War_Force
Joined: 15 Apr 2016
Total Posts: 2611
06 May 2016 01:21 PM
You need to make a receiver and a trigger in a global script and a local script. So for example, whenever you want to fire an event without any return you use RemoteEvent, if you want it to return something (Useful if you want some event to happen whenever something loads or not) then you use RemoteFunction.

So here's a brief example:

--Script
re=Instance.new("RemoteEvent",game.ReplicatedStorage)
re.Name="RemoteEvent"

game.Players.PlayerAdded:connect(function(plr)
re:FireClient(plr,"Hello World!")
end)

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

re.OnServerInvoke:connect(function(...)
local data={...}
if data[1] then
print(data[1])
end)

This will basically make it print whatever you fire into the client.


Report Abuse
mudkip99 is not online. mudkip99
Joined: 17 Jun 2008
Total Posts: 3362
06 May 2016 01:22 PM
Have a main server script with a table of players, and each player has a local script that has a function that fires when it receives a remote event/function signal.

In the main server script, there's a condition that decides which players can see the block and fires the remote event/function with necessary information (color, size, position, a model to clone from replicatedstorage, etc) only on the clients that should see it. Then the function in the client's local script fires,creating a block using the information given. Note that this only really works if the object doesn't ever change, because coordinating changes across clients would be a nightmare (or at least very, very ugly)

Another method is to have the object exist serverside on all clients and simply make it transparent without collision or call Destroy() on it in a clients local script if they shouldn't see it. (I'm not 100% certain this would work, BTW, but i seem to recall doing something similar before)
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