local hitpart = script.Parent
local function onclick(click)
local h = click.Parent:FindFirstChild("Humanoid")
if h then
print('it works')
local player = game.Players:GetPlayerFromCharacter(click.Parent)
player.PlayerGui.Song.Frame.Visible = true
end
end
hitpart.ClickDetector.MouseClick:connect(onclick)
Please help explain where I went wrong.

1 comment
My thing though is why does it find a player why couldn't I just use the script i made since it works if it's a ontouch function