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

How do I add a sound effect when the button is hovered over?

Heya guys, this is my first question apparently. Well, I'm trying to make a button that makes a sound effect when the mouse is hovering over it. I don't know how to make a script for it so I'll need some help.

The Script I attempted,

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.RulesFrameG.Visible = true
	script.Parent.Parent.Visible = false
	
	-- >>Sound Effect on hover over.
	
	-- >> Services
	local UserInputService = game:GetService("UserInputService")
	
	-- >> GUI Elements
	local GRules = script.Parent
	
	-- >> Player's Mouse
	local mouse = game.Players.LocalPlayer:GetMouse()
	
	-- >> Sound
	if GRules.MouseEnter = true
		then script.Parent.FindFirstChild:("Sound")
			Sound.Playing = true
		end
end)

2 comments

0

There is a mouse Enter Event

0

Yeah, so..?

1 answer

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