-
What do you want to achieve? Keep it simple and clear!
I am trying to remove a tag after 15 seconds player got it -
What is the issue? Include screenshots / videos if possible!
I read a few documents and past posts but still didn’t understand why it is not working. this maybe not considered as a issue or ıdk -
What solutions have you tried so far Did you look for solutions on the Developer Hub?
Usingtask.wait()
works fine and removes the tag so I guess I am kinda stupid to not make it work withos.clock
but while using os.clock it removes the tag without waiting any seconds
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
here is the code I tried
Humanoid.Died:Connect(function()
if not CollectionService:HasTag(player,"Tag") then
CollectionService:AddTag(player,"Tag")
local FirstTime= os.clock()
local TimeLimit = 15
print(os.clock())
if os.clock()>=FirstTime then
print("TEst1") -- it does print
FirstTime = os.clock() + TimeLimit
CollectionService:RemoveTag(player,"Tag")
end
end