Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why isn't the loading Gui loading the character?


 s = script 
 gui = s.Parent
 bg = gui.Bg
 base = bg.BarBase
 bar = base.Bar
 label = base.PercLabel
 
 cp = 0
 added = 0.33

lp = game:GetService("Players").LocalPlayer

function LoadGame()

	while cp < 100 do
		wait(0.01)
		cp = cp + added 
		
		label.Text = cp.."%"
		
		local size = cp / 100
		bar.Size = UDim2.new(size,0,1,0)
	end
	
	startGame()
	
end

function startGame()
	
	gui:remove()	
	lp:LoadCharacter()
	
end

 LoadGame()
 

On line 32 it should load the character, but it's not... why?

1 answer

✓ Accepted answer

The :LoadCharacter() method can only be called by a serverscript, not a localscript

2 comments

0

It's in replicated storage and it's linked to a GuiManager in Serverscriptsservive

0

The script calling :LoadCharacter() has to be a serverscript, this script is a local script since you can get the localplayer.

This discussion is preserved as it was. New answers, comments, and votes are closed.