Scripts after the Loading Screen not working! (HELP PLS)

the title says it all: all the scripts that were transfered to workspace dont work

script.Parent.Parent.Enabled = true

local contentProvider = game:GetService('ContentProvider')
local assetFolder = game:GetService('ReplicatedStorage').Map:GetDescendants()

local map = game:GetService('ReplicatedStorage').Map

game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Chat,false)
game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList,false)
game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)

local player = game:GetService('Players').LocalPlayer
local char = player.Character

char:WaitForChild('Humanoid').WalkSpeed = 0
char:WaitForChild('Humanoid').JumpHeight = 0

local loadAssets = #assetFolder

for i,v in pairs(assetFolder) do
	contentProvider:PreloadAsync({v})
	
	script.Parent.percentage.Text = i..' / '..loadAssets
	script.Parent.Bar.Progress:TweenSize(UDim2.new(i/loadAssets, 0,1,0), 'Out', 'Quint', 0.1, true)
end

local tS = game:GetService('TweenService')
local info = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)

for Is, descedancts in pairs(map:GetChildren()) do
	descedancts.Parent = workspace
end

tS:Create(script.Parent,info,{BackgroundTransparency=1}):Play()
tS:Create(script.Parent.Title,info,{TextTransparency=1}):Play()
tS:Create(script.Parent.Title1,info,{TextTransparency=1}):Play()
tS:Create(script.Parent.Bar.Progress,info,{BackgroundTransparency=1}):Play()

wait(.5)

game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Chat,true)
game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList,true)
game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)

script.Parent.Parent:Destroy()

char:WaitForChild('Humanoid').WalkSpeed = 16
char:WaitForChild('Humanoid').JumpHeight = 0.5
1 Like

If the scripts are inside the map, then they wont work as you’re adding the map with client

how can i solve this problem then?

Add the map into workspace, it wont matter if the loading screen is already there

ok i’ll try this ty for the help!

Dont forget to change script for loading ofc

what about the scripts in the folder?

local door = workspace,door

it doesnt work since the items are in the folder

Just put whole map folder inside workspace, also why you’re using comma in “workspace,door”

ok okay tysm! problem solved :smiley:

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