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

How would i run a script thats in ServerScriptService after a person clicks a TextButton?

Asked by
Tnipo 10
4 years ago

Hello my name is Solskoir.

I've been trying to figure this out for a little while.

What i'm trying to do is, I have a ragdoll engine/script and I have it so when I press R it ragdolls my character but i'm trying to make it so you can use it with mobile and I figured that i could use a TextButton. I tried a few other scripts such as ones that need the actual script in the text button that you wanna run. But it doesn't work. So how would i do this?

0
use remote events, i just learned this today RobloxGameingStudios 145 — 4y

1 answer

Log in to vote
0
Answered by
ArtBlart 533 Moderation Voter
4 years ago

Simple. RemoteEvents.

RemoteEvents allow communication between the client and the server. Just be careful with how you implement these, as a vulnerability in your remote's code can give exploiters unexpected access to things or control over things.

RemoteEvents can go either way. You can send information to the server via the method :FireServer(), you can send information to the client via the method :FireClient(). I'd recommend using the wiki or watching a video tutorial for this, as often times beginners to the subject tend to get confused.

If you have any further questions, feel free to shoot me a DM @artblart#3386 and I can see if i can help you out.

Ad

Answer this question