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

MouseButton1Up is not a valid member of TextButton?

Asked by 2 years ago

Hello, I am trying to create a repeating tweened GUI that stops once you click a GUI text button. But, whenever I try out the script, the tween does not play and stops the rest of the script.

This is the Local Script

Aimbar.ClickFrame.MouseButton1Up = true

repeat
    player.PlayerGui.Screen.AimBar.AimStick:TweenPosition(
        UDim2.new(0.951, 0, -0.5, 0),
        "InOut",
        "Sine",
        1, 
        false, 
        nil
    )
    wait(1.01)
    player.PlayerGui.ScreenGUI.AimBar.AimStick:TweenPosition(
        UDim2.new(0.026, 0, -0.5, 0),
        "InOut",
        "Sine",
        1,
        false, 
        nil
    )
    wait(1.01)
until Aimbar.ClickFrame.MouseButton1Up == true

2 answers

Log in to vote
0
Answered by
XRed03 17
2 years ago

I see what's wrong. It's the very first line. You can't just set MouseButton1Up to true because it's not a value that you can change. It's more of a trigger. It would be like the computer holding down left click for you. Since the code will stop once it senses an error, simply remove the first line and that should work

Ad
Log in to vote
0
Answered by 2 years ago

Get rid of 1st line it does not help

Answer this question