Hello, I've got a script that makes a GUI visible when the player dies, but my problem is that when the player presses the RespawnButton it closes the gui which is good however it opens up right after because of the players Respawn Time. Is there a way to get around this? If I set it to zero it will just reopen the GUI after 0 seconds correct?
how to turn off respawnTime?
2 answers
What if you just put it like 10 then when they died the UI popups right? So then it has like a timer for like 10 secs too so they will automatically spawn back if they didnt click it
14 comments
Script 1 (Respawning Character) ~~~~~~~~~~~~~~~~~ local RemoteEvent = game.ReplicatedStorage.RemoteEvent RemoteEvent.OnServerEvent:Connect(function(player) game.Players.CharacterAutoLoads = false player:LoadCharacter() end) ~~~~~~~~~~~~~~~~~
Here is my script for the GUI Button local RespawnButton = script.parent local menu = script.Parent.Parent local Players = game:GetService("Players") local player = Players.LocalPlayer local RemoteEvent = game.ReplicatedStorage.RemoteEvent --new variable RespawnButton.MouseButton1Click:Connect(function() if player then menu.Visible = false RemoteEvent:FireServer(game.Players.LocalPlayer
Oh I get what you mean
wait let me try this to my self to make sure it works
Ill edit my answer
there it should work, If you have any problems reply here
I turned character auto loads off in Players and now the GUI won't display
local RemoteEvent = game.ReplicatedStorage.RemoteEvent RemoteEvent.OnServerEvent:Connect(function(player) game.Players.PlayerAdded:Connect(function(player) game.Players.CharacterAutoLoads = false player:LoadCharacter() end) end)
wdym by that
Ill try to remake what u tryin to do
oh bc the script cant see the character
I found a way hol up
I made one work but its messsy
Read my asnwer again I edited it
well i mean you CAN just set the respawn time to more than 1200 (20 minutes), so that if the person does try to wait for respawn, the person gets kicked by the whole idle for 20 minutes thing, and set respawn time to zero, wait() and then set respawn time back to le big number when you decide the player should respawn.
1 comment
Well i tried setting the RespawnTime to 1200 and it still teleports me back to the spawn point and the GUI pops up again
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Yeah you should just be able to change the respawntime in players
AnotherPerson_999, I just tried that and it isn't working. Seems that RespawnTime isn't the one doing it i guess. It's teleporting me to the spawn and making the GUI visible again after like two seconds