im trying to make it so that when the player hovers their mouse over the button that has the localscript inside of it, it doesnt work
local button = script.Parent button.CursorHover:Connect(function() button.Text = "lol" end)
You were very close! However, some of your syntax must be fixed in order for this to work.
local button = script.Parent button.MouseEnter:Connect(function() button.Text = "lol" end)
In that same very script, you can also use another function that detects when the player has moved their mouse off of the button.
button.MouseLeave:Connect(function() button.Text = "Previous Text|Desired Text" end)