So, I made my own spill system and when I clean the spill, the spill gives insane amounts of points instead of giving 1 and I still havent figured out how to solve this issue, I have been trying for like the past hour.
Here’s the code:
local Spill = script.Parent
local TweenService = game:GetService("TweenService")
local tween = TweenService:Create(Spill, TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {Size = Vector3.new(0,0,0)})
local Debounce = false
game.Players.PlayerAdded:Connect(function(Player)
Spill.Touched:Connect(function(Touch)
if Touch.Parent.Name == "Mop" then
if Debounce == false then
Debounce = true
if Spill.Transparency == 0 then
tween:Play()
repeat wait() until Spill.Size == Vector3.new(0.001, 0.001, 0.001)
Spill.Transparency = 1
Spill.Size = Vector3.new(0.05, 5.375, 5.375)
Player.leaderstats.Points.Value += 1
end
Debounce = false
end
end
end)
Spill.TouchEnded:Connect(function()
tween:Pause()
Debounce = false
end)
end)