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

How do I parent my part and why isnt this working?

Asked by 5 years ago
Edited 5 years ago

So with numerous trials Ive made a tycoon dropper in the shape of a tree. There are no errors to output when I play the game. Someone apparently told me I have to parent part. Me being a beginner lua coder, Im not too sure how to do it.

This is my current code:

local bool LoopOn = true while (LoopOn == true) do wait (3) local DropArea = script.Parent.Drop local Apple = script.Parent.PullApple local part = Apple:Clone() part.Name = "Cash" local number = Instance.new("IntValue", part) number.Value = 1
part.Position = DropArea.Position part.Anchored = false

game.Debris:AddItem(part, 10) end

My tree is collidable, except the part 'Drop' (which is a union) 'PullApple' is (a union which looks like an apple and) anchored but collidable in the grass base of the tree.

Pictures https://gyazo.com/837665680cece775e6f5de35128494fe https://gyazo.com/898f1163e602fbd01215a376fed86f13

Thanks, yours truly, a confused lua coder

0
What is the "10" arguement? 3ora 54 — 5y
0
And what is your part currently parented to? 3ora 54 — 5y
0
Never use while wait() do User#21908 42 — 5y
0
use code block HappyTimIsHim 652 — 5y

Answer this question