Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How can I smoothly tween ClockTime when round starts?

Asked by 3 years ago

Hello, My question is how can I tween ClockTime smoothly at exact time (0) and back to 12 when round ends? I just looked everything up and I didn't found anything that could help me, everyone is doing day/night cycle when I'm trying to tween ClockTime at exact time (like in the rake) Currently my script has NOTHING about tweening or lighting so I don't see any point of adding it in here and no its not a request... I just don't know how do to this and tutorials or anything else tries to implement day/night cycle which isn't what I need...

if you really need script for that, here have it

function sortTeams()
    -- ClockTime tween 0
    wait(0.4)
    local Players = game.Players:GetPlayers()
    local localtimer = roundtime
    while localtimer > 0 do
        wait(1)
        status.Value = "Round ends in: "..localtimer.." seconds!"
        localtimer = localtimer - 1
        if localtimer == 0 then
            status.Value = "Intermission!"
        end
    end

    roundtime = 0
    -- ClockTime tween 12
    wait(3)
end

1 answer

Log in to vote
1
Answered by
iuclds 720 Moderation Voter
3 years ago
TweenService:Create(game.Lighting,TweenInfo.new(1),{ClockTime = 6}):Play()
Ad

Answer this question