When i make the dropper clone it keeps cloning in the same place.
And it makes ALOT of droppers and the if statement is completely ignored. I am looking for help with that issue and i don't know why the statement is ignored
script.Parent.Touched:Connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
local price = script.Parent.Parent.Script.price
local itemname = script.Parent.Parent.Script.itemname
local playername = hit.Parent.Name
local currencyName = script.Parent.CurrencyName
local tt = 0.1
local player = game.Players:FindFirstChild(playername)
local disabled = false
print(playername)
local function Negate()
local dropper = game.ServerStorage:FindFirstChild(script.item_name.Value)
if disabled == false then
script.Parent.Transparency = 1
script.Parent.Parent.Part.Transparency = 1
script.Parent.Parent.BillboardGui.TextBox.Visible = false
local debounce = false
if disabled == false and dropper and debounce == false then
local d = dropper:Clone()
d.Parent = workspace
disabled = true
debounce = true
end
disabled = true
print(disabled)
end
end
Negate()
end
end)

7 comments
Lighting should NOT be used as storage, and clone is deprecated use Clone
Is "item_name" an ObjectValue?
@Naxxanar No it is not
Could you tell me what it is?
Actually, my bad. That doesn't seem to be the problem. We need more of your code to resolve your issue.
I have published all the code but for some reason the top isnt formatted
Put the ENTIRE script in between the ~~~~~ and ~~~~~. I think with the entire script some of us could help you.