'This is the droppers code,
–//Variables
local DropperPartsFolder = script.Parent.Parent.Parent.DropperParts
–//Loops
while task.wait(2) do
local NewPart = Instance.new(“Part”, DropperPartsFolder)
NewPart.Position = script.Parent.SpawnPart.Position
NewPart.Size = Vector3.one
NewPart.BrickColor = BrickColor.new(“Dusty Rose”)
NewPart.Material = (“Marble”)
local newEmitter = Instance.new("ParticleEmitter")
newEmitter.Color = ColorSequence.new(BrickColor.new("Dusty Rose").Color)
newEmitter.Size = NumberSequence.new(1) --//Put whatever number you want
newEmitter.Parent = NewPart
newEmitter.TimeScale = (0.2)
local CashValue = Instance.new("NumberValue")
CashValue.Value = 1
CashValue.Name = "CashValue"
CashValue.Parent = NewPart
NewPart.Parent = DropperPartsFolder
end
– newPart.Material = (“Marble”)
This is the script where the error is shown:
local CashValue = script.Parent.Parent.Parent.Parent.Values.CashValue
script.Parent.Touched:Connect(function(Hit)
if Hit.Name == “Part” and Hit:FindFirstChild(“CashValue”) then
CashValue.Value += Hit:FindFirstChild(“CashValue”).Value
Hit:Destroy()
end
end)
ERROR: CashValue is not a valid member of Folder "Workspace.TycoonModel.Values