Why are the scripts gone?

the scripts are gone, idk why:

please feedback, idk why my scripts are gone!

When you start the game you are looking at the explorer from a client’s perspective, meaning you cannot view anything in ServerScriptService or ServerStorage. If you switch over to the server you will see the scripts in there

(They are not gone, just hidden to the player)

its also not in player scripts ;(

Yeah, Putting Items,Scripts,etc inside ServerStorage, ServerScriptService, StarterCharacterScripts ,and StarterPlayerScripts are hidden from the player when the game starts, pretty much a normal thing

but the scripts are also not working… and there is no errors in the output!

the Scripts should work, from what i see in the ServerScriptService, it runs on the Server so there might be an error (Even if there is no error in output) on a certain item

What are the scripts supposed to do?

the leaderboards won´t load, also in the main game there is like no gui but there musst be! and if i click a button it won´t pop the Gui…

Can you please show us the scripts? we may be able to help.

this is the script gui from the leaderboard!

repeat wait() until script.Parent.Parent.Parent.Parent:FindFirstChild("leaderstats")~=nil --Waits until player is loaded

local players = game.Players:GetChildren() --Gets list of all players

for i,p in pairs(players) do
	
	local label = Instance.new("TextLabel",script.Parent.List.Scroller)
	label.BackgroundTransparency=1
	label.Text = p.Name
	label.TextColor3 = Color3.fromRGB(240, 240, 240)
	label.Font = Enum.Font.ArialBold
	label.TextScaled = true
	label.TextXAlignment=Enum.TextXAlignment.Left
	label.Name = label.Text
	local money = Instance.new("TextLabel",label)
	local wins = Instance.new("TextLabel",label)
	money.Size = UDim2.new(0.5,0,1,0)
	money.Position = UDim2.new(1,0,0,0)
	money.Text = p.leaderstats.Money.Value
	money.TextScaled = true
	money.TextColor3 = Color3.fromRGB(240, 240, 240)
	money.Font = Enum.Font.ArialBold
	money.BackgroundTransparency = 1
	wins.Size = UDim2.new(0.5,0,1,0)
	wins.Position = UDim2.new(1.5,0,0,0)
	wins.Text = p.leaderstats.Wins.Value
	wins.TextScaled = true
	wins.TextColor3 = Color3.fromRGB(240, 240, 240)
	wins.Font = Enum.Font.ArialBold
	wins.BackgroundTransparency = 1
	
end

function redraw()
	if #players<9 then
		script.Parent.Size=UDim2.new(0.188,10,#players/16+0.0625,10)
		script.Parent.Title.Size = UDim2.new(0.5,-10,1/(#players+1),-10)
		script.Parent.List.Size = UDim2.new(0.5,-10,1-(1/(#players+1)),-10)
		script.Parent.List.Scroller.CanvasSize = UDim2.new(0,0,1,0)
	else
		script.Parent.Size=UDim2.new(0.188,10,0.625,10)
		script.Parent.Title.Size = UDim2.new(0.5,-10,0.111,-10)
		script.Parent.List.Size = UDim2.new(0.5,-10,0.889,-10)
		script.Parent.List.Scroller.CanvasSize = UDim2.new(0,0,#players/8,0)
	end
	
	for i,v in pairs(script.Parent.List.Scroller:GetChildren()) do
		v.Size = UDim2.new(0.5,0,1/#players,0)
		v.Position = UDim2.new(0,0,1/#players*(i-1),0)
	end
	
end

redraw()

game.Players.PlayerAdded:Connect(function(p) --Sees when player joins
	table.insert(players,p) --Adds player to playerlist
	repeat wait() until p:FindFirstChild("leaderstats")~=nil --Waits until player is loaded
	--Code below adds player to leaderboard
	local label = Instance.new("TextLabel",script.Parent.List.Scroller)
	label.BackgroundTransparency=1
	label.Text = p.Name
	label.TextColor3 = Color3.fromRGB(240, 240, 240)
	label.Font = Enum.Font.ArialBold
	label.TextScaled = true
	label.TextXAlignment=Enum.TextXAlignment.Left
	label.Name = label.Text
	local money = Instance.new("TextLabel",label)
	local wins = Instance.new("TextLabel",label)
	money.Size = UDim2.new(0.5,0,1,0)
	money.Position = UDim2.new(1,0,0,0)
	money.Text = p.leaderstats.Money.Value
	money.TextScaled = true
	money.TextColor3 = Color3.fromRGB(240, 240, 240)
	money.Font = Enum.Font.ArialBold
	money.BackgroundTransparency = 1
	wins.Size = UDim2.new(0.5,0,1,0)
	wins.Position = UDim2.new(1.5,0,0,0)
	wins.Text = p.leaderstats.Wins.Value
	wins.TextScaled = true
	wins.TextColor3 = Color3.fromRGB(240, 240, 240)
	wins.Font = Enum.Font.ArialBold
	wins.BackgroundTransparency = 1
	

	redraw() --Changes size of leaderboard
	
end)

game.Players.PlayerRemoving:Connect(function(p) --Sees when player leaves
	table.remove(players,table.find(players,p)) --Removes player from playerlist
	script.Parent.List.Scroller:FindFirstChild(p.Name):Remove()
	redraw() --Changes size of leaderboard
end)

This Appears to be a custom leaderboard, Is that correct?
What exactly are you trying to do with the leaderboard?

yes, i am making my own costume leaderboard, but for some reasone there is no error in the output…

okay, ty for your feedback, i will dm my friend to help me :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.