I am working on an FPS and i got it all done and all, but the weapons only show on the client (they are placed in the camera)
So basically I tried making a remote event and cloning the weapon through the server to weld it to the weapon in the camera, but it wont work.
I am trying to find a way to do it so that the other players can see your gun aswell.
Client script:
Weapon = Resources.Weapons[Settings.Primary.Value]:clone()
Weapon.Parent = Camera
game.ReplicatedStorage.ServerGun:FireServer(Weapon)
Server script:
game.ReplicatedStorage.ServerGun.OnServerEvent:connect(function(Player, cgun)
local gun = Player.PlayerGui.Client.Settings.Primary.Value
local sgun = game.Lighting.Resources.ServerWeapons:FindFirstChild(gun):Clone()
sgun.Parent = Player.Character
local weld = Instance.new("Weld", sgun)
weld.Part0 = sgun
weld.Part1 = cgun.Handle
weld.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,math.pi/2,0)
end)
This works when i play in studio, but not in game or on local servers.
If you can help then please do!
Thanks!

1 comment
Even when i parent it to workspace though, only the player can see it (this is FE btw). And yes, most of the scripts are client sided. The animations and stuff for the gun look smoother in the client (because of renderstepped)