What do you want to achieve? Im trying to make ClockTime go up
What is the issue? Im getting an error and ClockTime isnt going up
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)