Having trouble moving tools with a script for a random loot block?
Asked by
8 years ago Edited 8 years ago
Hello, I am currently creating a survival FPS on roblox. I've so far made my models, now i need to start working on scripts. first i started the random loot areas. i made a designated block for it. i duplicate it and stick it where ever i want loot to spawn. I tested it with blocks and it worked fine, but when i tried it with my guns it didn't. i used CFrame, Vector3, and :MoveTo() to try and fix it, but my output always says: MoveTo is not a valid member of Tool. here is my script:
01 | script.Parent.Transparency = 1 |
07 | tools = game.ReplicatedStorage.Civillian:GetChildren() |
09 | clone = tools [ math.random( 1 ,#tools) ] :Clone() |
10 | CClone = clone:GetChildren() |
11 | clone.Parent = game.Workspace |
12 | CClone.Position = script.Parent.Position |
if anyone could help or give suggestions, it would be amazing.