What do you want to achieve?
I want to resolve a bug in my game where player characters do not die (i.e., their health does not reach zero) on mobile devices, especially in third-person view. Additionally, the Reset Character button does not work on the same devices when this issue occurs.
What is the issue?
When either a local or server script tries to set a player’s health to zero on a mobile device, nothing happens, and the player remains alive. This issue is more prevalent in third-person view. Additionally, the Reset Character button is unresponsive – it neither turns gray nor reacts to clicks. This is especially problematic as the bug severely impacts gameplay. Below is a snippet of code I suspect might be related to the issue:
ContextActionService:BindAction(
FREEZE_ACTION,
function()
return Enum.ContextActionResult.Sink
end,
false,
unpack(Enum.PlayerActions:GetEnumItems())
)
What solutions have you tried so far?
-
Commented out certain lines in the main module that might be causing the issue.
-
Checked for known solutions and similar problems on the Developer Hub and various forums.
-
Tested on multiple devices to isolate the problem to mobile, particularly in third-person view.
Additional Details:
-
This problem occurs specifically on mobile devices.
-
Both local and server scripts are affected.
-
The Reset Character button doesn’t just become grayed out; it simply doesn’t respond to clicks at all.
Does anyone have an idea of what might be causing this? Could it be related to the ContextActionService binding above, or might there be another part of the code affecting this issue? Any insights would be greatly appreciated.
Thank you in advance for your assistance!