I'm making a bunch of new plugins. Here is one:
local toolbar = Plugin:CreateToolbar("Troy's Lighting Tools") local button = Plugin:CreateButton( "Enable Time Changer", "Click to enable time changer; a feature that will change the TimeOfDay untill you close studio.", "http://www.roblox.com/Sun-cutie-mark-item?id=152525784" ) local mouse = GetMouse() local hit = mouse.Hit function onhit(hit) m = Instance.new("Message", game:GetService("CoreGui")) m.Text = "Untill you close studio, the time will always be changing." wait(5) m:Destroy() game.Lighting.TimeOfDay = TimeOfDay+1 -- the timeofday is a string, but holds numbers. end mouse.hit:connect()
my problem is that I don't know how to get the user's mouse. (too bad plugins don't run localscripts.) I've seen it done like a thousand times. Can someone help me on this? Thanks for reading!
EDIT: The toolbar is not there even.OH MY GOD WHY DO I MAKE SO MANY MISTAKES??????!!!!!!!!!!!
EDIT 2: On line 4, it says that statement spans multiple lines. On line 8 it says (unknown global 'GetMouse'). finally on line 15 it says (Unknown global 'TimeOfDay').
The variable is plugin
not Plugin
.
To add time to the Lighting, it has to be done like this:
game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight() + 1)