Tweening MoonAngularSize

Hello! I hope the person reading this is doing well.
Today while messing around with tween service and the skybox i decided to try out tweening the ‘MoonAngularSize’ from 11 to 0.

I was deceived though when i did so as it seems it was becoming smaller for an instant and then it came back to its normal size.

I couldn’t really find anything on this topic so i’d like to know; is it possible to tween the MoonAngularSize property?

2 Likes

Where is the “MoonAngularSize” property you speak of located?

When you create a “sky” under “Lighting” you can find what i mentioned in its properties (sky’s properties)

I’m pretty sure that “MoonAngularSize” isn’t meant to be changed overtime, and is supposed to be a single value. This is why you can’t tween it.

It seems to be working for me. The Moon shrinks and disappears. Can you send over your code? Maybe you are doing something incorrectly.

Alright, give me a quick moment.

local moon = game:GetService("Lighting"):WaitForChild("Sky")

local goal2 = {}
goal2.MoonAngularSize = 0


local moonTweenInfo = TweenInfo.new(
	6,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local moonTween = ts:Create(moon, moonTweenInfo, goal2)

Note: i have the tween service variable more up in the script

The reason you’re experiencing this issue is because of the easing direction I assume. Try using InOut or In instead. I’m not sure if this works

Alright, thank you. I’ll try this

I assume it’s played outside of this block of code but just in case it’s this simple; did you remember to play the tween?

Yes ofcourse, it triggers and plays when an intValue reaches a certain number value

Seems to not work still. Here is the block of code where it triggers.

local ts = game:GetService("TweenService")

local moon = game:GetService("Lighting"):WaitForChild("Sky")

local goal2 = {}
goal2.MoonAngularSize = 0


local moonTweenInfo = TweenInfo.new(
	6,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.In,
	0,
	false,
	0
)

local moonTween = ts:Create(moon, moonTweenInfo, goal2)

clickDetector1.MouseClick:Connect(function()
	if not debouce then
		debouce = true
		
		task.wait(.5)
		
		
		mdl:WaitForChild("Head").Sound:Play()
		value.Value += 1
		
		if value == 6 then
			moonTween:Play()       
		end

		
	
	
		clickDetector1:Destroy()
		
	end
	
		
	

end)

This line here seems to be the issue. It is definitely something with how it triggers because I got the tween working just fine.

if value == 6 then
	moonTween:Play()       
end

Seems like you forgot to do value.Value when comparing the number. Also, value isn’t defined anywhere here but I assume that it is further up.

1 Like

Yup it was that, thank you alot. I dont know how i didnt notice that when i usually never forget about it

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.