Okay, I'm still learning a lot so please dont be mad. So im trying to pass a variable from a local script with a remote event to a server script. Heres an example:
--local script:
script.Parent.MouseButton1Down:Connect(function() -- this is a example so this might seem choppy
local selected = "Gun1" --As an Example
game.ReplicatedStorage.GetGun:FireServer(player,selected)
end)
--Server Script:
function getgun(player,selected)
gun = game.ServerStorage.Weapons:FindFirstChild(selected)
gun.Parent = player.Backpack
end
game.ReplicatedStorage.GetGun.OnServerEvent:Connect(getgun)
Both 'player' and 'selected' are considered as the localplayer. Im trying to make 'selected' as the variable im trying to pass to my server script but its not working.
Any Help?

1 comment
You don't FireServer with the player as the first argument. Roblox adds that automatically in for the server event.