Im trying to make it when you enter in a specific area, the music stored locally in the player gets deleted, but whenever I enter the area, the output says Argument 1 missing or nil. Heres the script in the block:
script.Parent.Touched:Connect(function(hit)
local find = hit.Parent:FindFirstChild("Humanoid")
if find then
local find2 = game.Players:FindFirstChild(hit.Parent.Name)
if find2 then
find2.PlayerGui.Music.RemoteEvent:FireClient()
end
end
end)
Heres the part of the localscript located inside a ScreenGui that uses OnClientEvent:
script.Parent.RemoteEvent.OnClientEvent:Connect(function()
sound:Destroy()
script.Parent:Destroy()
end)
