Give Time even if player isn't moving

Hey, I’m trying to find a way to give the player time even if they are standing still on a part. The touched event only works if the player is moving around on the part but when they stand still it doesn’t work.

script.Parent.Touched:Connect(function(touch)
	local Player = game:GetService("Players"):GetPlayerFromCharacter(touch.Parent)
	
	if Player then
		local Debounce = Player:FindFirstChild("Debounce")
		if Debounce.Value == false then
			Player.leaderstats.Time.Value += 1
			
			Debounce.Value = true
			task.wait(1)
			Debounce.Value = false
		end
	end
end)
1 Like

Touched is not the event you should be using for this. You should check if the player’s character is in-bounds with the object instead.

Can you give me an example on how I can do this?

There’s a property named ArePartsTouchingOthers which can let you know which parts are touching each other. There’s sample code in the link.

I’ve tried but have had no luck, is there anything else you can recommend?