Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do you change the text size?

Asked by 3 years ago

im trying to do:

local Close = script.Parent

Close.MouseEnter:Connect(function() Close.TextSize = 17 end)

Close.MouseLeave:Connect(function() Close.TextSize = 14 end)

it just doesnt work why?

0
could u use a code block to showcase the code? Catr899 12 — 3y

1 answer

Log in to vote
0
Answered by
Catr899 12
3 years ago

Hope this helps! i think the problem was either debounce or the textscaled value was true

local debounce = false
script.Parent.MouseEnter:Connect(function()
    if not debounce then
        debounce = true
        -- code here
        -- this is testing code V
        script.Parent.TextSize = 100
        script.Parent.TextScaled = false
        wait(0.5)
        debounce = false
    end

end)

local debounce = false
script.Parent.MouseLeave:Connect(function()
    if not debounce then
        debounce = true
        -- code here
        -- this is testing code V
        script.Parent.TextSize = 20
        script.Parent.TextScaled = false
        wait(0.5)
        debounce = false
    end

end)

dont remove the debounce as that will bug it out

Ad

Answer this question