script.Parent.Click.MouseButton1Click:connect(function(player)
local gui = script.Prompt:Clone()
gui.Main.Disabled = false
gui.Parent = player.PlayerGui
end)
This is a server script inside a button that is inside a surface gui.
Whenever I try to click the button that is supposed to clone the gui into my player it gives me an error shown below. Any help would be appreciated, thanks!
Workspace.Jukebox.Screen.SurfaceGui.Background.Script:4: attempt to index local 'player' (a nil value)

2 comments
It doesn't return any arguments. :c http://wiki.roblox.com/index.php?title=MouseButton1Click
Btw, maybe this's what you're looking for? c: http://wiki.roblox.com/index.php?title=LocalPlayer