So what I'm trying to do is have a part called "Seller" make the orbs sell when they touch them, but instead the orb just sits around and does nothing when touching the seller. How would I fix this script?
local player = game.Players.LocalPlayer
local cash = player:WaitForChild("leaderstats"):WaitForChild("Cash")
local multiplier = 1
local orbvalue = 5
script.Parent.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChildWhichIsA("Seller") then
cash.Value += orbvalue * multiplier
script.Parent:Destroy()
print("hit")
end
end)

1 comment
idk I had something like that happen once. I also used a "this and this and this" statement and it's just too glitchy. You can either make different if statements inside each other or just cut out "hit and hit.Parent" cause they are useless in this case. btw idk if destroying the script and THEN printing will work