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

How to make flashing the lights of a police car with a TextButton of GUI? [closed]

Asked by 6 years ago
Edited 6 years ago

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.

2
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. Gabrix23 6 — 6y
0
it'd help if you send your code too, but il do my best :) mewant_taco 17 — 6y

Closed as Too Broad by ee0w and Azarth

This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

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
i just noticed that at line three i said "function", but i meant event .p. mewant_taco 17 — 6y
Ad