Object is not cloning but no errors occur. It just doesn’t clone anything.
01 | function TestService:Spawn(Player, Weapon) |
02 | if Weapon ~ = Items.IDArray [ Weapon ] then |
03 | game.ReplicatedStorage.SuccessMessage:FireClient(Player, "? Successfully found " ..Weapon.. " with ID " ..Items.IDArray [ Weapon ] .ID) |
04 |
05 | -- Welding |
06 | local Weapon = game.ReplicatedStorage [ Weapon ] |
07 | local Clone = Weapon:Clone() |
08 | Clone. Parent = game.Workspace |
09 | local WeldC 0 = Instance.new( "Weld" , Clone.Model.Handle) |
10 | local WeldC 1 = Instance.new( "Weld" ) |
11 | WeldC 0. Name = "WeldC0" |
12 | WeldC 1. Name = "WeldC1" |
13 | else |
14 | game.ReplicatedStorage.ErrorMessage:FireClient(Player, "? Sorry, I couldn't find " ..Weapon.. " in my Array!" ) |
15 | end |
16 | end |
1 | Clone.Parent = game.Workspace |
2 | -- :D |
I've managed to solve my own problem, I'll go ahead and edit my title to solved. I simply added a Fake variable followed by the model location then added a clone statement and then it worked:
01 | function TestService:Spawn(Player, Weapon) |
02 | if Weapon ~ = Items.IDArray [ Weapon ] then |
03 | game.ReplicatedStorage.SuccessMessage:FireClient(Player, "? Successfully found " .. Weapon .. " with ID " .. Items.IDArray [ Weapon ] .ID) |
04 |
05 | -- Welding |
06 | local WeaponSaid = game.ReplicatedStorage [ Weapon ] |
07 | local Fake = WeaponSaid:Clone() |
08 | Fake.Parent = game.Workspace |
09 | local WeldC 0 = Instance.new( "Weld" , WeaponSaid.Model.Handle) |
10 | local WeldC 1 = Instance.new( "Weld" ) |
11 | WeldC 0. Name = "WeldC0" |
12 | WeldC 1. Name = "WeldC1" |
13 | else |
14 | game.ReplicatedStorage.ErrorMessage:FireClient(Player, "? Sorry, I couldn't find " .. Weapon .. " in my Array!" ) |
15 | end |
16 | end |
A similar answer to the person above but, they seemed to miss that I already added that to my script. Thanks for the support anyway.