local UserInputService = game:GetService("UserInputService");
local Toggle = false;
script.Parent.MouseButton1Click:Connect(function()
if not Toggle then
Toggle = true;
game.ReplicatedStorage.Events.Ragdoll:FireServer(true)
else
Toggle = false;
game.ReplicatedStorage.Events.Ragdoll:FireServer(false)
end
end)
UserInputService.InputBegan:Connect(function(input, typing)
if input.KeyCode == Enum.KeyCode.R and not typing then
if not Toggle then
Toggle = true;
game.ReplicatedStorage.Events.Ragdoll:FireServer(true)
else
Toggle = false;
game.ReplicatedStorage.Events.Ragdoll:FireServer(false)
end
end
end)
Make them invisible and when the loading screen finishes make them visible again? You could also change the zindex of the loading screen to 2 if that helps while also setting the gui zindex type I think it is called to Global
the thing I don’t understand Is that the first gui I made (the summon pet one) dosn’t have any script making it go invisible and then visible. It just did it on its own
To load in a loading screen you can put a local script in ReplicatedFirst and put in the script
repeat
—your fancy gui loading screen
until game.Loaded
—Then make the other buttons appear
This will wait for the game on the client side to load the primary stuff first and then to continue and do your gui script. While the game is loading, the loading screen would be the only one loaded and then the other would be enabled or Visible again.
Can I see all the screenGuis you have on StarterPlayer?