if x >= 0 and x <= 100 then game.Lighting.LMG:Clone().Name = "LMGClone" game.Lighting.LMGClone.Parent = game.Workspace game.Workspace.LMGClone.PrimaryPart = game.Workspace.LMGClone.Handle game.Workspace.LMGClone:SetPrimaryPartCFrame(script.Parent.CFrame) game.Workspace.LMGClone.Name = "LMG" end end
Its supposed to take LMG from lighting, and put the entire LMG model in the location of script.Parent
script.Parent is just a part btw
you should really use a variable
if x >= 0 and x <= 100 then game.Lighting.LMG:Clone().Name = "LMGClone"--all you did here was clone it and rename it, its parent is still nil game.Lighting.LMGClone.Parent = game.Workspace -- there is not LMGClone in lighting as you renamed the CLONE game.Workspace.LMGClone.PrimaryPart = game.Workspace.LMGClone.Handle game.Workspace.LMGClone:SetPrimaryPartCFrame(script.Parent.CFrame) game.Workspace.LMGClone.Name = "LMG" end end
it should look like
if x >= 0 and x <= 100 then local lmgclone = game.ServerStorage.LMG:Clone() -- you should not use Lighting for storage lmgclone.Parent = workspace lmgclone.PrimaryPart =workspace.LMGClone.Handle lmgclone:SetPrimaryPartCFrame(script.Parent.CFrame) lmgclone.Name = "LMG" end end