Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Having trouble moving tools with a script for a random loot block?

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:

script.Parent.Transparency = 1
for i = 5,0,-1 do
	print(i)
	wait(1)
end

    tools = game.ReplicatedStorage.Civillian:GetChildren()
    
    clone = tools[math.random(1,#tools)]:Clone()
       CClone = clone:GetChildren()
clone.Parent = game.Workspace
CClone.Position = script.Parent.Position
  
    

if anyone could help or give suggestions, it would be amazing.

1 comment

0

I had to stick the Tool in a model and then use :MoveTo()

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.