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

why is my plugin not working? [SOLVED]

Asked by 10 years ago

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').

0
You can't set the TimeOfDay with numbers. It has to be a string. Tkdriverx 514 — 10y

1 answer

Log in to vote
0
Answered by
Tkdriverx 514 Moderation Voter
10 years ago

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)

0
Are you running it in a script/local script, or are you running it as an actual plugin? Tkdriverx 514 — 10y
Ad

Answer this question