Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

So this script someone "fixed" for me doesn't actually work how I want it to, so how do I fix this?

I want this to make the moon grow bigger. This is only a test btw but this doesn't work.

local RunService = game:GetService("RunService")
for m = 0, 60, 0.001 do
    game.Lighting.Sky.MoonAngularSize = m
    RunService.RenderStepped:Wait() 
end

1 answer

✓ Accepted answer
local Lighting = game:GetService("Lighting")
local StartingSize = 0 -- my personal starting size for the moon
function RenderWait(Numeral)
	if Numeral == 0 or Numeral == nil then
		game:service("RunService").Stepped:wait(0)
	else
		for i = 0, Numeral do
			game:service("RunService").Stepped:wait(0)
		end
	end
end
function MyFunction()
	for m = 0,60,0.1 do
		RenderWait()
		Lighting.Sky.MoonAngularSize = (StartingSize) + m
	end
end
wait(3)
game.Players["Hwk3rAlt"].Chatted:Connect(function(msg)
MyFunction()
end)

I just created this for you, I hope you enjoy. You can disconnect the function that makes it happen when you chat.

Feel free to connect MyFunction() to what you need.

1 comment

0

Thank you! I'll try to learn some of the new lines of code you put in and apply that to other scripts in the future.

This discussion is preserved as it was. New answers, comments, and votes are closed.