Click Detector only works on one side of the map

Hello! I’m having a weird thing happen with click detectors in my game and I’m not sure what’s causing it. I have a fairly large map (the baseplate dimensions are [1504.255, 16, 1398.885], ) and I have a local script that is supposed to count how many buttons around the map are clicked.
When I have a button on the far right side of the map, the script works perfectly fine, but when it is on the far left of the map, nothing happens?

here’s a block of the code I’ve been tinkering with, located in the StarterPlayerScripts

for i, btn in pairs(BTNS) do -------------------------------------if button pressed vv
	local clickDetector = btn:WaitForChild("ClickDetector")
	clickDetector.MouseClick:Connect(function(chr)
		clickDetector:Destroy()
		table.insert(buttonsfound, btn)
		updateIndicator()
		print(#buttonsfound)
		if #buttonsfound == #mapButtonsFLDER:GetChildren() then
			spawnClickDetector(chr)--spawn for frog clickdetector
			showFrog()
			print("FOUND")
			Collider.ClickDetector.MouseClick:Connect(function() --frogClickDetector clicked
				print("collected")
				OSFevent:FireServer(chr)
			end)
			
			
		end
	end)

end

Any feedback is appreciated, thank you! :slight_smile:

That is likely due to streaming:

Use persistent models or CollectionService, things that are explained in the article above.

I have Streaming enabled, and my models’ streaming behavior is set to persistent yet I still cannot trigger the click detector. I’m not sure how to implement the CollectionService in this instance, as the buttons are all handled from this local script.

1 Like