• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


01 Dec, 2024

Updated at 02 Dec, 2024

Why has collection service stopped working?

I made a script whereas when this turtle is touched, the player gets damaged and an explosion happens, but even though i tagged it and made the collection service script for it, it doesnt work, the script was working before but suddenly it just stopped working, anyone know why?

local CS = game:GetService("CollectionService")
--normal basic obstacles
CS:GetInstanceAddedSignal("Obstacle"):Connect(function()
	for i, model in pairs(CS:GetTagged("Obstacle")) do
		local db = false
		model.Touched:Connect(function(hit)
			print("Damaged")
			if hit.Parent:FindFirstChild("Humanoid") then
				local db = false
				if db == false then 
					
				hit.Parent.Humanoid.Health -= 30
				local Bomb = Instance.new("Explosion")
				Bomb.BlastPressure = 100000
				Bomb.BlastRadius = 10
				Bomb.Position = model.Position
				Bomb.Parent = model
			db = true
			wait(4)
			db = false
			end
			end
		end)
	end
end)

2 posts - 2 participants

Read full topic