I’m wondering if I can have blood in my game, as long as it has a toggle that is forced off when a player is on Xbox? The game is for all platforms.
There’s no way to detect if a user is on Xbox. How would you do it?
You could ask at the start, or check their input
They can plug in a keyboard though.
(You can plug-in a Keyboard to an XBox?)
Then your best bet is to have them to answer a question
They can always lie. A PC user could also plug in an Xbox controller and unplug their mouse and keyboard.
You can, actually. It’s pretty simple:
local guiService = game:GetService("GuiService") if guiService:IsTenFootInterface() then -- player is on xbox end
GuiService:IsTenFootInterface() will always return true if the player is on console, and will always return false if they’re not, no matter if they have a keyboard plugged in or something.
Interesting, I never knew that. But wouldn’t it falsely trigger for VR-Enabled users as well?
As in falsely, I mean that you don’t want to filter VR users.
I’m not sure if it checks VR, but just in case, you can check with UserInputService.VREnabled.
local guiService = game:GetService("GuiService") local userInputService = game:GetService("UserInputService") if guiService:IsTenFootInterface() and not userInputService.VREnabled then -- player is on xbox end
Why wouldn’t you just have a blood toggle for everyone?
If you use PolicyService you could also hide the toggle for users under 13 to keep a lower age rating. (Probably 9+ assuming there is fighting or violence)
I think it would be best if everybody got a blood toggle (default on) and you just hide and disable it for Xbox and under 13 users.