Hello! could someone help me with that, what’s wrong in my code?
Exactly this part:
script.Parent.BackgroundColor3 = BrickColor.new("Bright green")
full script
local Player = game:GetService("Players").LocalPlayer
Character = Player.Character or Player.CharacterAdded:Wait()
Humanoid = Character:WaitForChild("Humanoid")
Animator = Humanoid:WaitForChild("Animator")
local dance = Instance.new("Animation")
dance.AnimationId = "rbxassetid://5937558680"
local danc = Animator:LoadAnimation(dance)
local Play = false
script.Parent.MouseButton1Click:Connect(function()
if Play == false then
danc:Play()
script.Parent.BackgroundColor3 = BrickColor.new("Bright green")
Play = true
else
danc:Stop()
Play = false
end
end)