serverscript

	script.Parent.MouseButton1Down:Connect(function(plr)

	local XPleaderboard = game.ServerScriptService:FindFirstChild("XPLEAD"):Clone()
	XPleaderboard.Parent = plr.PlayerGui
end)

1 comment

0

Server scripts can't deal with a player's gui directly. You'll need a local script to display the data and a server script to share the data with the local script using a remote.