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

Local script wont work for FilterEnabled?

Asked by 4 years ago
Edited 4 years ago

Hello, I want to learn how i can make a local script FE, But i not sure how i can acheive this.

Can anyone help me understand how i can achieve this? Most of my game function is on a local script.

Explorer Preview https://gyazo.com/5bc50c4a07552977f2af8948d4e35078

LocalScript https://www.mediafire.com/file/0eeqzlrvoywdlk9/LocalScript.txt/file

0
right click a place. click LocalScript. write code Fifkee 2017 — 4y
0
Use Instance.new("LocalScript") from visual studio code and put it in your games explorer. Easy dub. greatneil80 2647 — 4y
0
My apologies for my miss type information, What i mean't was how can i make this local script Filter Enabled. So other peoples can see what their doing when they place blocks and not standing on a invisible block that does not exist on their screens. User#25662 0 — 4y
0
Local scripts can't perform any action that changes anything for other players. Learn RemoteEvents/Functions. User#27525 1 — 4y
0
you can fire a remote event each time you want to change a property of thing in your game that all players can see, search up remote events on youtube xXmacerofXx 29 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

What I see in your comments is pure wrong.

FilteringEnabled: Forced for every game. Your game has filtering enabled turned on, a localscript . Filtering Enabled doesn't allow hacks from viewing server code and protects most server code.

Localscript: A script that allows only the client (Or only the player) to have access to certain code / blocks / objects, whatever...

You are trying to accomplish a way to make it so that a client can send data to the server for all players to view. To do so, we shall use remote events.

First: Insert a remote event in replicatedstorage...

localscript:

local remote = game.ReplicatedStorage.RemoteEvent
local size = Vector3.new(5,5,5)
local position = Vector3.new(0,0,0)
remote:FireServer("MakePart",size,position)

Assuming your remote is named "RemoteEvent", we create 2 variables, one called size and position for a Part that will be created from the server

we are now getting the same remote event. And creating data that everyone can see script:

local remote = game.ReplicatedStorage.RemoteEvent
remote.OnServerEvent:Connect(function(p,size,pos)
    local part = Instance.new("Part")
    part.Parent = workspace
    part.Position = pos
    part.Size = size
end)

when using OnServerEvent, the first parameter, "p" is always the player, it always must be first. size and pos are the size and positions used from the localscript.

Also remember to not make your game mainly client-sided because exploiters can have access to module scripts and localscripts. Try sticking to server code. Use lcoalscripts slightly.

Also if this helped, please click accept answer :D

Ad

Answer this question