-- im trying to make a system s the player gains time 1 by 1 but it adds alot on  
-- 1 second

heres my script :

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("ForceField") then
		hit.Parent.ForceField:Destroy()
	end
	-- this is on the floor where your supposed to get time
	
	while true do
		wait(1)
		local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
		plr.leaderstats.Time.Value = plr.leaderstats.Time.Value +1
		break
	end
	
end)

3 comments

0

if anyone can help me, please do. Im trying to make my game like the system in steal time from others & be the best

0

Is there a certain error this is sending the Character or Forcefield could be nil?

0

i dont know.