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)
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)