Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
wookey12 174
7 years ago
Edited 7 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:

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.

0
I had to stick the Tool in a model and then use :MoveTo() wookey12 174 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Answered in chat

Ad

Answer this question