Help Click Button Script

Is there any way to make a script like

click_button(game.Players.PlayerGui.ScreenGui.TextButton)

i have use VirtualUser but it not work :cactus:

 game:GetService'VirtualUser':CaptureController()
 game:GetService'VirtualUser':Button1Down(Vector2.new(206.164, 378.811))

That’s not how you use :GetService()

You’re meant to use it like this:

game:GetService("VirtualUser")

not work :grinning: :smiley: :grinning:

I’m not telling you that it will work, but I’m saying that you didn’t use :GetService() in a right way

Research for text button here.

Not sure how you want them to click and perceive it as by a local script or a server-side one. Just place a local script under the text button, and use one of these events - it is your preference. But if you want to process it through a server-side script, use remote events.


@RocketB0ii You don’t need parentheses unless getting something with a string.

game:GetService"ReplicatedFirst" -- Correct

game:GetService"Players".PlayerAdded:Connect(function"player" -- Incorrect, because the parameter is a string