Cloning gun breaks aim down sights system

  1. What do you want to achieve? Keep it simple and clear!
    I want to fix the problem with my gun’s cloning system
  2. What is the issue? Include screenshots / videos if possible!
    The gun only works when it is put in StarterPack and given to the player, but when it is duplicated, it glitches for some reason, and my sights don’t work on the gun.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have already tried changing the cloning system in the serverscript

Clone script:

local FirstPlayerIn = game.ReplicatedStorage:WaitForChild("FirstPlayerIn")
FirstPlayerIn.OnServerEvent:Connect(function()
	wait(1)
	FirstPlayerIn:Destroy()
end)
local FIRE = game.ReplicatedStorage:WaitForChild("SpawnInMap")
local FIRES = game.ReplicatedStorage:WaitForChild("SpawnInMapServer")
local timer = game.ReplicatedStorage:WaitForChild("Timer")
for i = 1,30 do
    timer.Value -= 1
	wait(1)
	end  
game.ReplicatedStorage["Sky (NOT MINE 2)"].Parent = game.Lighting
FIRE:FireAllClients()
game.Workspace.SpawnLocation.Position = Vector3.new("392.95, 4.964, 492.235")
wait(0.1)
	FIRES:Fire()
	script.Parent.Meteors.Enabled = true
	script.Parent.Meteors2.Enabled = true
	script.Parent.Meteors4.Enabled = true
	script.Parent.Meteors3.Enabled = true
	local StarterPack = game.ServerStorage.M1911:Clone()
StarterPack.Parent = game.StarterPack
for _,player in ipairs(game.Players:GetPlayers()) do
	local character = player.Character or player.CharacterAdded:Wait()
	if player then
		local startingweapon = game.ServerStorage.M1911:Clone()
		startingweapon.Parent = player.Backpack
	end
	character.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.SpawnMap1.Position + Vector3.new(0,3,0))
end
wait(1)
game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		char.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.SpawnMap1.Position + Vector3.new(0,3,0))
	end)
end)
1 Like