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

"rbxassetid//".. player isnt working?

Hello i am making admin commands, i want to make sound script but it isnt working can i get an help please? Thanks!

function commandTable.sound(message, player)
	local sarki = Instance.new("Sound")
	sarki.Parent = game.Workspace
	wait(0.1)
	sarki.SoundId = "rbxassetid://" ..player
	print("Sarki oynatiliyor")
end

2 comments

2

You can't use a player instance as sound id.

0

U are karnajj's friend why u are here?

1 answer

The feature "rbxassetid" is meant for:

-Sound IDs

-Decals

-Meshes

But not players. If you want to detect a player's ID, use "http://www.roblox.com/users/" and then the player's ID.

Using "rbxassetid://"

The feature itself can do many things. For starters, applying a Sound ID to "rbxassetid://" would support a Sound Instance with a Sound ID from which it can play.

Applying a Decal ID to "rbxassetid://" will display a certain decal as long as the script is a child of the Decal.

Applying a Mesh ID to "rbxassetid://" will supply a Part with a mesh to make it look like something else.

To exactly use "rbxassetid://", you could do (for audio):

s = Instance.new("Sound")
s.SoundId = "rbxassetid://000000000" -- ID goes here

For decals:

d = Instance.new("Decal")
d.Parent = script.Parent -- Script's Parent is a Part
d.Texture = "rbxassetid://000000000" -- ID goes here

For meshes:

m = Instance.new("MeshPart")
m.Parent = script.Parent -- Script's Parent is a Part
m.MeshId = "rbxassetid://000000000" -- ID goes here

That's what you need to know.

2 comments

0

then, how can i use it?

0

Go To the library and click the sound you want and copy the ID

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