Why is this armor script not working ?
Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
So i made a script to make an armor but it won't work.
Here's the script :
01 | local Kagune = script.Parent |
02 | local Character = Kagune.Parent.Parent.Parent.Character |
03 | local K = script.Parent:GetChildren() |
06 | if K [ i ] .ClassName = = "Part" then |
07 | local W = Instance.new( "Weld" ) |
08 | W.Part 0 = Kagune.Handle |
10 | local HP = CFrame.new(Kagune.Handle.Position) |
11 | local C 0 V = Kagune.Handle.CFrame:inverse()*HP |
12 | local C 1 V = K [ i ] .CFrame:inverse()*HP |
15 | W.Parent = Kagune.Handle |
17 | local W 2 = Instance.new( "Weld" ) |
18 | W 2. Part 0 = Character.Torso |
19 | W 2. Part 1 = Kagune.Handle |
20 | W 2. C 0 = CFrame.new( 0 , 0 , 0 ) |
23 | K [ i ] .CanCollide = false |
24 | K [ i ] .Parent = Character |
Error : 23:58:37.888 - Handle is not a valid member of Model
23:58:37.889 - Script 'Players.Player.Backpack.Kagune.Kagune.Script', Line 8
But Handle is in the model. I don't know why it's gone everytime.
Thanks for helping me !