Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Filtering Enabled With Local Bricks?

Asked by
Vezious 310 Moderation Voter
8 years ago

Is it possible since Local scripts can't touch workspace?

2
Yes, in fact FilteringEnabled makes it easier to do so, since you don't have to hide the parts inside Current Camera or find some other hacky way to make these Local Parts. M39a9am3R 3210 — 8y
1
It's not exactly that LocalScripts can't touch the Workspace, it's more of the client can't touch the server. A part made through a LocalScript can only be seen by the client (or the player however you'd like to call it), and not by the server to be seen by other clients. M39a9am3R 3210 — 8y
0
Well, like m39a9am3r If you make a currect local enviornment for the local parts then it is theoretically possible. User#5978 25 — 8y

2 answers

Log in to vote
3
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
8 years ago

You misunderstand FilteringEnabled.

When FilteringEnabled is on, LocalScripts can change anything in the game. The difference is that the server and all other clients ignore those changes -- but the changes still happen for the local player.

Thus local-bricks are actually easier with FilteringEnabled, because anything that a LocalScript does is automatically isolated to just that player.


This script will make a block floating above the player's head that only they can see:

local p = Instance.new("Part", workspace)
p.Anchored = true
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()

while wait() do
    p.CFrame = character.Head.CFrame + Vector3.new(0, 5, 0)
end
Ad
Log in to vote
1
Answered by 8 years ago

Props to M39a9am3R

Sorta?

This is possible since there are objects in Workspace that are Client-Sided an example would be CurrentCamera. The problem with filteringenabled is it doesn't technically restrict access from local scripts to workspace more or less it restricts access to actual server changes. So to sum it up it can but only if you create a local environment or use Client-Sided classes in workspace.

Answer this question