With server local, you can literally use the localplayer function in a serverscript! So basically what it does is when you join, it stores your name in a modulescript and then you can use a script to print the names of each player or even access localplayer’s PlayerGui / PlayerScripts in a SERVER SCRIPT! If you encounter any bugs, please tell me! Module: https://create.roblox.com/store/asset/126797111979191/server-local-V1?pagePosition=1 and when you put it in studio, read read me for more info!
4 Likes
..im so unbelievably confused
3 Likes
when using the localplayer on the server, what player does it use?
3 Likes
This is all of the code:
local serverlocal = {}
serverlocal.players = {}
game.Players.PlayerAdded:Connect(function(player)
serverlocal.localPlr = player
table.insert(serverlocal.players, player)
player.AncestryChanged:Connect(function(child, parent)
if not player:IsDescendantOf(game) then
for i, v in ipairs(serverlocal.players) do
if v == player then
table.remove(serverlocal.players, i)
break
end
end
end
end)
end)
return serverlocal
So… what does it do? It provides a lesser version of the Players service (for free)! However, the localPlr field doesn’t work.
3 Likes
absolutely brilliant ill take your entire stock
this needs to be pinned, best contribution to the devforum all year
2 Likes
I don’t think you realize how servers actually work
Yes, but if you read “read me”, there is gonna be something thag tells u what code to type.
Basically uses every player, but if you were like to make an anti cheat it would detect the cheats for each player, one by one. (Stores all players in a table)
i can see the effort put in this good job