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?
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.