This is the script in serverscriptservice
game.Players.PlayerAdded:connect(function(player)
local rmtevent = game:GetService('ReplicatedStorage'):WaitForChild('IsSpawn')
rmtevent.OnServerEvent:connect(function()
game.Lighting.GunMagsStorage.GunStorage.Deagle:Clone().Parent = game.Players[player.Name].Backpack
end)
end)
This is the script in startergui which fires the remote event
local rmtevent = game:GetService('ReplicatedStorage'):WaitForChild('IsSpawn')
local isSpawner = {["Prestory"] = true, ["iiFrzyii"] = true, ["dom1107"] = true,["MacRRP"]= true,["RobSnappin"]= true,["A_TrueGentlemen"]= true}
function onChatted(message, player)
if message == "/sg Gucci" and isSpawner[player.Name] then
rmtevent:FireServer()
end
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message) onChatted(message, player) end)
end)
This script is meant to check if there name is on the list then when they type /sg gucci a gun clones to there inventory for some reason it does not work and no error is given in the output may someone help thanks.
