Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

BackgroundColor3 is only changing to white and thats it!?!? in the output theres nothing

local player = game.Players.LocalPlayer
local playbutton = player.PlayerGui:WaitForChild("startmenugui"):WaitForChild("Frame"):WaitForChild("frameplay"):WaitForChild("Play")
local startmenugui = game.StarterGui:WaitForChild("startmenugui")


playbutton.MouseEnter:Connect(function()
	playbutton.BackgroundColor3 = Color3.new(194, 144, 87)
	playbutton.Position = UDim2.new(0.1, 0,1.225, 0)

	game.StarterGui.SoundFX:WaitForChild("Hoversound"):Play()
end)

playbutton.MouseLeave:Connect(function()
	playbutton.BackgroundColor3 = Color3.new(46, 55, 95)
    playbutton.Position  = UDim2.new(0.37, 0,1.225, 0)

	game.StarterGui.SoundFX:WaitForChild("Hoversound"):Stop()
	
end)

3 comments

0

Replace all Color3.new by Color3.FromRBG

0

oh we answered in the same time

0

not working

2 answers

✓ Accepted answer

Try this

local player = game.Players.LocalPlayer
local playbutton = player.PlayerGui:WaitForChild("startmenugui"):WaitForChild("Frame"):WaitForChild("frameplay"):WaitForChild("Play")
local startmenugui = game.StarterGui:WaitForChild("startmenugui")


playbutton.MouseEnter:Connect(function()
    playbutton.BackgroundColor3 = Color3.fromRGB(194, 144, 87)
    playbutton.Position = UDim2.new(0.1, 0,1.225, 0)

    game.StarterGui.SoundFX:WaitForChild("Hoversound"):Play()
end)

playbutton.MouseLeave:Connect(function()
    playbutton.BackgroundColor3 = Color3.fromRGB(46, 55, 95)
    playbutton.Position  = UDim2.new(0.37, 0,1.225, 0)

    game.StarterGui.SoundFX:WaitForChild("Hoversound"):Stop()

end)

Change all your Color3.new() to Color3.fromRGB()

You can read up more on Color3 here.

This discussion is preserved as it was. New answers, comments, and votes are closed.