I have 2 scripts (1 local script and 1 script ) comunicating with a remote event from the server to the client for killing once every player that enters the game. The problem i have is, in the test mode inside roblox studio it Works and kill me, but when i go to the normal servers it don't kill me. The script is inside the server script service and the local script is inside the starter pack. Someone knows why?
Script
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local KillNewPlayers = Instance.new("RemoteEvent")
KillNewPlayers.Parent = game.ReplicatedStorage
KillNewPlayers.Name = "KillNewPlayers"
local function onPlayerAdded(player)
KillNewPlayers:FireClient(player)
end
Players.PlayerAdded:Connect(onPlayerAdded)
Local script
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local char = game.Players.LocalPlayer.Character
local KillNewPlayers = ReplicatedStorage:WaitForChild("KillNewPlayers")
KillNewPlayers.OnClientEvent:Connect()
wait(1)
char.Humanoid.Health = 0
wait(1)
game.Players.LocalPlayer.Backpack.KillNewPlayers:Destroy()
game.StarterPack.KillNewPlayers:Destroy()

2 comments
Please don't waste ram on a variable you never use. You made a variable in the script on line 2, so use it!
In normal testing mode it always has FE off. If your game has FE on you need to press the start button near the test button to see if it works with FE on.