I am kind of confused why this wont work [variable not working?]
Asked by
3 years ago Edited 3 years ago
i have tried to make a music player gui but it seems the variable is messed up and is nto detectign the id from textbox? i am quite new to lua a year of doing it heres my code
local id = script.Parent.Parent.ID.Text
local left = game.Workspace.left
local right = game.Workspace.right
script.Parent.MouseButton1Click:Connect(function()
right.Sound:Stop()
left.Sound:Stop()
right.Sound.SoundId = ('rbxassetid://' .. id)
left.Sound.SoundId = ('rbxassetid://' .. id)
end)