Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

"rbxassetid//".. player isnt working?

Asked by 6 years ago

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
You can't use a player instance as sound id. Mayk728 855 — 6y
0
U are karnajj's friend why u are here? FrezeTagger 75 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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.

0
then, how can i use it? FrezeTagger 75 — 6y
0
Go To the library and click the sound you want and copy the ID Fightysaur 0 — 6y
Ad

Answer this question