--//Variables local AdminModule = require(game:GetService("ReplicatedStorage").AdminModule) --//Main game.Players.PlayerAdded:Connect(function(player) --//Variables local PlayerGui = player.PlayerGui local AdminPanel = PlayerGui:WaitForChild("AdminPanel",7) local Main = AdminPanel.Main local PlayerData = Main.PlayerData local MainFunctions = Main.MainFunctions local Playerlist = Main.Playerlist --//Admin Checking & Handling if AdminModule.checkAdmin(player.Name) == true then MainFunctions.ResetData.MouseButton1Click:Connect(function() local PlayerSelected = AdminModule.getSelected(player) if PlayerSelected == nil then print("Player has not been selected!") else game.Players[PlayerSelected].PlayerData.Level.Value = 1 game.Players[PlayerSelected].PlayerData.XP.Value = 0 game.Players[PlayerSelected].PlayerData.NeededXP.Value = 1000 game.Players[PlayerSelected].PlayerData.Money.Value = 0 game.Players[PlayerSelected].PlayerData.Rebirth.Value = 0 game.Players[PlayerSelected].PlayerData.XPRate.Value = 1 wait(1) game.Players[PlayerSelected]:Kick("Your data has been reset for various reasons. Please rejoin!") end end) MainFunctions.AdminTool.MouseButton1Click:Connect(function() --don't really got an admin tool exdee end) MainFunctions.Shutdown.MouseButton1Click:Connect(function() for i,v in pairs(game.Players:GetChildren())do v:Kick("Server has been shutdown. Please rejoin!") end end) MainFunctions.KickPlayer.MouseButton1Click:Connect(function() local PlayerSelected = AdminModule.getSelected(player) if PlayerSelected == nil then print("Player not selected") else game.Players[PlayerSelected]:Kick("Kicked by an admin!") end end) Main.PlayerData.AdminTool.MouseButton1Click:Connect(function() --ignore this end) else player:Kick("You shouldn't have access to this panel. If you found a bug, please report it for possible in-game items!") end end)
Basically, it doesn't work in-game. I'm trying to make an admin panel but now it doesn't work. Everything works fine on Studio but not in-game. The game is FE, so maybe that's a problem? If so, how would I make this compatible with FE. This is a server script in ServerScriptService. I know I could use Remote Events but I feel it's not that safe... I wanna have it serverside
To make that thing be FE-Compatible, all you need to do is to use RemoteEvents in sending the variables (just like what PlaasBoer said)
Your main concern is that you want to do it serverside. A very important thing to remember in keeping your game secure is to never trust the client with anything. What I would do for this is to check the player if they are actually admins in-game, give them the admin panel things, make those admin panel things fire the RemoteEvent when used, and the most important of all, make the server check if the player is really authorized to use the admin panel.