So there is a Local Script with a script inside of it. Then i want to clone the script inside the local script and put the clone inside the workspace, but when i do that, the clone script does not run. But it is in the workspace and is not disabled. I want filtering enabled on in case the game is hacked. so is there any way for me to keep it on and just change the way i am doing this. That is my situation but how do get filtering enabled on and still have scripts work inside the client?
LocalScript inside gui:
local s = script.Script:Clone() s.Parent = game.Workspace s.Disabled = false
Script:
print("Runs") -- this is to make sure it works but it doesn't work local Player = game.Players:FindFirstChild(script.Parent.Value.Value) Player.PlayerGui.MurderScreen.Enabled = false
Here's an example of communicating with the server to start the game.
Server script:
local Event = game.ReplicatedStorage:WaitForChild("ReadyEvent") -->> RemoteEvent local ReadyPlayers = {} Event.OnServerEvent:Connect(function(Player) -->> Recieve affirmation local InTable = false for _,_Player in pairs (ReadyPlayers) do -->> Check if player is already ready if _Player == Player then InTable = true break end end if not InTable then table.insert(ReadyPlayers,Player) end end) while true do ReadyPlayers = {} -->> Reset ready players Event:FireAllClients() -->> Send request to "ready up" repeat wait() until #ReadyPlayers >= game.Players.NumPlayers -->> Check if the number of ready players is the same as the number of players in game -->> do the game wait() end
Local script:
local Event = game.ReplicatedStorage:WaitForChild("ReadyEvent") Event.OnClientEvent:Connect(function() -->> When a request to "ready up" is recieved Event:FireServer() -->> Send affirmation end)
Hope I helped!
~TDP