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

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

Asked by 4 years ago

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

Log in to vote
0
Answered by
pingsock 111
4 years ago
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.

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. Hwk3rAlt 14 — 4y
Ad

Answer this question