Hey, I have an issue where the module script code below works perfectly fine in play solo, until I rejoin the same server where the touched event stops detecting the player. I’ve tried many different solutions to the point I had to ask on here. Any solutions?
function CollectionHandler.collecting(player, tower)
-- player is player object, tower is individual tower
local leaderstats = player:FindFirstChild("leaderstats")
local coins = leaderstats:FindFirstChild("Coins")
local coinsMulti = player:FindFirstChild("CoinsMulti")
local dropletMulti = player:FindFirstChild("DropletMulti")
local deposit = tower.Buttons.Deposit
local storage = deposit:FindFirstChild("Storage")
local bucket = tower.Tower.Bucket
local collecter = tower.Tower:FindFirstChild("AutoCollector", true)
local inventory = player:FindFirstChild(player.Name.."'s Inventory")
bucket.ChildAdded:Connect(function(droplet)
local dropletInventory = inventory:FindFirstChild(droplet.Name)
droplet.Touched:Connect(function(hit)
-- detects hit but doesn't detect any player limbs
game.ReplicatedStorage.Test:FireClient(player, hit.Name)
local humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
if hit and hit.Parent then
if humanoid and humanoid.Parent.Name == player.Name then
activateTouch(dropletInventory, droplet)
end
end
end
end)
end)