parenting a cloned tool freezes roblox studio?
i'm trying to implement a viewmodel in my game by cloning the player's character and the tool, but when i try to parent to tool's clone to the cloned character roblox studio freezes (from what i can tell) indefinitely.
the code in question (clientside)
1 | character.Archivable = true |
2 | local viewModel = character:Clone() |
3 | character.Archivable = false |
4 | local viewTool = tool:Clone() |
5 | viewModel.Parent = character |
6 | viewTool.Parent = viewModel |
i know it's just the part that sets the parent because if i comment that line out it doesn't freeze, but the tool is invisible.