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

Why is my music player outputting this error? Can you please help me?

Asked by 4 years ago
Edited 4 years ago

I am making a Music Player and it is sending the string of my name as the music ID.

Local Script(one inside of play button that activates server):

script.Parent.MouseButton1Click:Connect(function()
    local musicID = script.Parent.Parent.Parent.musicID.Text
    if musicID.Text == "" then
        print("Don't be dumb.")
    else
        game:GetService("ReplicatedStorage").musicPlayRE:FireServer(musicID)
    end
end)

Server:

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local musicPlayRE = ReplicatedStorage:WaitForChild("musicPlayRE")

musicPlayRE.OnServerEvent:Connect(function(musicID)
    musicPlayRE:FireAllClients(musicID)
end)

Main Client:

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")
local soundService = game:GetService("SoundService")

local localPlr = Players.LocalPlayer
local PlayerGui = localPlr.PlayerGui

local musicPlayRE = ReplicatedStorage:WaitForChild("musicPlayRE")

-- announcement func

-- music play func

musicPlayRE.OnClientEvent:Connect(function(musicID)
    local sound = soundService:WaitForChild("musicSound")
    sound.SoundId = musicID
end)

-- kick func    

Error:

16:39:22.246 - Players.AviaJxnny.PlayerGui.hotelClient:17: bad argument #3 to 'SoundId' (string expected, got Object)

0
what script is it? what script is hotel client? 3wdo 198 — 4y
0
IT IS THE MAINCLIENT. aviajxnny 4 — 4y

Answer this question