Hello Im working on a system where you can morph into anyone for 60 seconds once you buy a dev product. I made the system where you can morph I just don’t know how to make it so it will allow them to morph for the time and making it stack any help would be apricated
Use attributes to set the time that the morph lasts
local MorphTime = player:GetAttribute("MorphTime")
player:SetAttribute("MorphTime", MorphTime + 60)
while task.wait(1) do
local TimeLeft = player:GetAttribute("MorphTime")
player:SetAttribute("MorphTime", TimeLeft - 1)
if player:GetAttribute("MorphTime") <= 0 then
player:SetAttribute("MorphTime", 0)
-- Unmorph
end
end
Thank you so much I don’t know why I didn’t think of this!
1 Like
by ‘stacks’ did you mean that if they buy it again that it will add 60s onto the remaining time?
Yes that is what I mean every time it is bought it will add 60 seconds to your current time you can morph for
1 Like
alright. maybe im not seeing it but can you explain what part adds 60 every time they buy it
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.