I scripted the lights so that can flash endlessly but I don't know how to script them in to make them work with a button, and I already made the GUI button, please help.
COMMUNITY QUESTION
How to make flashing the lights of a police car with a TextButton of GUI?
1 answer
Before you read this, im not sure if this will work cuz im new too :/
Ok so, i think ur asking for the function required, so yeah, here it is:
first we create a variable for ur text button (just because variables are cool):
local button = -- ur button path: for example game.Workspace.StarterGui.button
then we add the function
local button = -- ur button path
button.MouseButton1Click:connect(function()
-- your code goes here
end
i hope it helped :D
again, im new at scripting
1 comment
1
i just noticed that at line three i said "function", but i meant event .p.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
P.S I'm new with scripting, I'm learning the basics, and if someone can make a script of this for me it would be really helpful.
it'd help if you send your code too, but il do my best :)