How do I make a mobile ragdoll button work?
Asked by
4 years ago Edited 4 years ago
I have made a ragdoll game which when you press "r" you ragdoll and to get up again. I have gotten the the button to appear from a Youtube video but can not get it to ragdoll / keybind to "r".
I also have this other script;
1 | local contextActionService = game:GetService( "ContextActionService" ) |
2 | function onButtonPress() |
5 | local mobilebutton = contextActionService:BindAction( "RagdollButton" ,onButtonPress, true , "r" ) |
6 | contextActionService:SetPosition( "RagdollButton" ,UDim 2. new( 0.72 ,- 25 , 0.20 ,- 25 )) |
7 | contextActionService:SetTitle( "RagdollButton" , "Doll" ) |