So i want my text to change background color when clicked, but instead it throws an error in the question name.
My code:
local ekran = script.Parent.Parent.Parent.Ekran.SurfaceGui.TextLabel
local cd = script.Parent.ClickDetector
cd.MouseClick:Connect(function()
ekran.BackgroundColor3 = Color3.New("Really red")
ekran.Text = "STOP"
end)
Edit: someone answered the question in comments. thanks!

5 comments
which line?
5
5
Color3.fromRGB(255,0,0). LocalScripts cannot be used to operate a ClickDetector.
But it is a normal script