local TextLabel = game.StarterGui.ScreenGui.TextLabel
I'm making an ability and I want a box that darkens when it's on cooldown but it doesn't change colour and I'm not getting an error message. This is a snippet of my code.
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.B and used == false then
used = true
TextLabel.BorderColor3 = Color3.fromRGB(193, 72, 76)
sound:Play()
humanoidRootPart.Anchored = true
local effects = game.ReplicatedStorage.ParticleEmitter:Clone()
local light = game.ReplicatedStorage.PointLight:Clone()
effects.Parent = character:FindFirstChild("Right Leg")
light.Parent = character:FindFirstChild("Right Leg")
spinAnimationTrack:Play()
spinAnimationTrack.Stopped:Wait()
humanoidRootPart.Anchored = false
event1:Fire()
sound.Stopped:Wait()
event2:Fire()
effects:Destroy()
light:Destroy()
task.wait(120)
TextLabel.BorderColor3 = Color3.fromRGB(255, 95, 100)
used = false
end
end)
** You are now Level 3! **