Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Any way to play user's default OS error sound?

Is there any way i can signal a user's device to play it's default error sound? This is for if they have been caught exploiting.

1 comment

0

Use a custom error sound because you can't check the OS the player is on.

1 answer

I don't think that there's currently a way for you to make Roblox access the computer's sounds through scripting (probably for user security reasons), but a workaround could be to create a Sound instance when a player is caught exploiting, set the SoundId to a system sound of your choice, and then play it.

-- LocalScript

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

local SystemSoundId = 0

local function UserCaughtExploiting()
	local Sound = Instance.new("Sound")
	Sound.SoundId = "rbxassetid://"..SystemSoundId
	Sound.Parent = workspace
	
	Sound:Play()
end

The only problem with this method is that since there's no way to check what operating system a player is running on, there's a chance that the system sound that you choose may be inaccurate to the player's sounds.

1 comment

0

Yeah. I'l stick with that.

This discussion is preserved as it was. New answers, comments, and votes are closed.