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
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