ClockTime isnt going up

  1. What do you want to achieve? Im trying to make ClockTime go up

  2. What is the issue? Im getting an error and ClockTime isnt going up

  3. What solutions have you tried so far? I have looked but i couldnt find anything that helped

The error im getting:
TweenService:Create no property named ‘Clocktime’ for object ‘Lighting’

The script:
local rep = game.ReplicatedStorage
local events = rep.Events
local event = events.event

--Event calling
event.OnServerEvent:Connect(function(player,data)
	if data.reason == "changeTeam" then
		player.Team = data.team
	end
end)

--Service shorthands
local tS = game:GetService("TweenService")
local lighting = game.Lighting
function tween(t,s,d,p,o)
	return tS:Create(o,TweenInfo.new(t,Enum.EasingStyle[s],Enum.EasingDirection    [d]),p)
end

--Environment Controller
spawn(function()
	while wait(1) do
		tween(1,"Sine","Out",{Clocktime = lighting.ClockTime + 1/60},lighting):Play()
	end
end)

It looks like your problem is occurring here, what is “t”, “s”, “d”, “p”, “o” though. You show nothing in your topic that tells us what that is.

Time, style, direction, properties, object

Instead of Clocktime, do "ClockTime" (not on lighting.ClockTime). You didn’t capitalize the t in Clocktime.

1 Like

I found an article to help you tween lighting:

You also need to fix the letters and fix some other things in your script for this to work.

1 Like

Thanks for pointing that out! It worked now