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
5 comments
right click a place. click LocalScript. write code
Use Instance.new("LocalScript") from visual studio code and put it in your games explorer. Easy dub.
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.
Local scripts can't perform any action that changes anything for other players. Learn RemoteEvents/Functions.
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