Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
MasterFAQ
6 months ago

The error in your code is probably that you didn’t assign the sound to a parent object so that it can be played at all. In Roblox, the sound must be assigned to a specific object, such as the workspace or part, as a parent.

local End = game.Workspace.EndOfThePlattform
local Yipie = Instance.new("Sound")


Yipie.SoundId = "rbxassetid://2209538642"
Yipie.Parent = End  -- Der Sound muss einem Parent-Objekt zugewiesen werden


local function Play()
    Yipie:Play()
    task.wait(10)
end


End.Touched:Connect(Play)

With the line

Yipie.Parent = End

the sound instance is assigned a parent (in this case the end of the platform), which ensures that the sound can be played.

raphaelbud
6 months ago

In your script, the sound is not played because the sound (Yipie) has not been added to a parent in the game. In Roblox, every instance to work properly in the game must be repaired in workspace or another container.

local End = game.Workspace.EndOfThePlattform
local Yipie = Instance.new("Sound")

Yipie.SoundId = "rbxassetid://2209538642"
Yipie.Parent = game.Workspace  -- Füge den Sound dem Workspace hinzu

local function Play()
    Yipie:Play()
    task.wait(10)
end

End.Touched:Connect(Play)

By adding the sound to the workspace (or another suitable parent), the sound should now be played when the script is executed.