The script I used was this but it didn’t work. It was made by Ulxqra.
humanoid.Died:Connect(function()
script.Parent.Frame.Visible = true --Where ever your frame is.
end)
wait(3)
script.Parent.MouseButton1down:Connect(function()
player:LoadCharacter()
script.Parent.Frame.Visible = false – Gui goes off
end)
You haven’t defined what player is.
I really don’t know how to script much, I just started learning and I don’t really understand much.
I scripted an Intro for my game and a couple other things but those were simpler.
Ulxqra
(Ulxqra)
August 23, 2020, 7:57am
#30
Would local player = game.Player.LocalPlayer
work?
kylerzong
(kylerzong)
August 23, 2020, 7:59am
#31
https://devforum.roblox.com/t/deadmessage-gui-its-that-simple/688889/6?u=kylerzong
Script In ServerScriptService
local Remote = Instance.new("RemoteEvent", game.ReplicatedStorage)
Remote.Name = "RespawnRemote"
Remote.OnServerEvent:Connect(function(plyr)
plyr:LoadCharacter()
end)
Localscript in StarterPlayerScripts
local Player = game.Players.LocalPlayer
local PlaySoundOnSpawn = true
local SpawnSound = "rbxassetid://134012322"
local ShowGuiOnDeath = true
local PlaySoundOnDeath = true
local DeathSound = "rbxassetid://157636218"
local OldGui = nil
Player.CharacterAdded:Connect(function(character)
if OldGui then OldGui:Destroy() end
if PlaySoundOnSpawn then
local Sound = Instance.new("Sound")
Sound.SoundId = SpawnSound
Sound.Volume = 2
game:GetService("SoundService"):PlayLocalSound(Sound)
game:GetService("Debris"):AddItem(Sound, Sound.TimeLength)
end
character:WaitForChild("Humanoid", math.huge).Died:Connect(function()
if PlaySoundOnSpawn then
local Sound = Instance.new("Sound")
Sound.SoundId = DeathSound
Sound.Volume = 2
game:GetService("SoundService"):PlayLocalSound(Sound)
game:GetService("Debris"):AddItem(Sound, Sound.TimeLength)
end
local Gui = Instance.new("ScreenGui", Player.PlayerGui)
Gui.IgnoreGuiInset = true
local Frame = Instance.new("Frame", Gui)
Frame.Size = UDim2.fromScale(1,1)
Frame.BackgroundColor3 = Color3.fromRGB(0,0,0)
Frame.BackgroundTransparency = 0.7
local TextLabel = Instance.new("TextLabel", Frame)
TextLabel.Size = UDim2.fromScale(0.1,0.15)
TextLabel.Text = "Dead"
TextLabel.Font = "Arial"
TextLabel.BackgroundTransparency = 1
TextLabel.TextColor3 = Color3.fromRGB(255,0,0)
TextLabel.TextScaled = true
TextLabel.Position = UDim2.fromScale(0.5 - TextLabel.Size.Width.Scale/2, 0.5 - TextLabel.Size.Height.Scale/2)
local TextButton = Instance.new("TextButton", Frame)
TextButton.Size = UDim2.fromScale(0.1,0.15)
TextButton.Text = "Respawn"
TextButton.Font = "Arial"
TextButton.BackgroundTransparency = 0.6
TextButton.BackgroundColor3 = Color3.fromRGB(0,0,0)
TextButton.TextColor3 = Color3.fromRGB(255,0,0)
TextButton.TextScaled = true
TextButton.Position = UDim2.fromScale(0.5 - TextLabel.Size.Width.Scale/2, 0.5 - TextLabel.Size.Height.Scale/2) + UDim2.new(0,0,0,200)
local RespawnRemote = game.ReplicatedStorage:WaitForChild("RespawnRemote")
TextButton.MouseButton1Down:Connect(function()
RespawnRemote:FireServer()
end)
end)
end)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
char.Humanoid.Died:Connect(function()
plr.PlayerGui.GUINAME.Enabled = true
wait(3)
plr.PlayerGui.GUINAME.Enabled = false
end)
end)
end)
just do something like this
But you see it needs to have a respawn button.
NilFloat
(NilFloat)
August 23, 2020, 8:04am
#34
I just made a simple and quick system right now and I’ll release my scripts on how I did it, here it is:
Make sure to add RemoteEvent inside of ReplicatedStorage you can change name if you want but make sure that you also do inside scripts.
Script in ServerScriptService:
local Event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent",4)
game:GetService('Players').PlayerAdded:Connect(function(player)
game:GetService("Players").CharacterAutoLoads = true
player.CharacterAdded:Connect(function(character)
game:GetService("Players").CharacterAutoLoads = false
character:WaitForChild("Humanoid").Died:Connect(function()
--Change here location to your dead screen frame or button as I did.
player.PlayerGui:FindFirstChild("DeadScreen"):FindFirstChild("TextButton").Visible = true
end)
end)
end)
Event.OnServerEvent:Connect(function(player)
player:LoadCharacter()
end)
LocalScript inside of a button for reset character:
local Event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent",4)
script.Parent.MouseButton1Down:Connect(function()
Event:FireServer()
end)
1 Like
NilFloat
(NilFloat)
August 23, 2020, 8:08am
#37
Did you change locations inside script based on your explorer location and names?
I’m a little big confused. I changed the names to the stuff they needed to like the DeathScreen I changed and a couple other things.
Yet nothing happens when I die.
NilFloat
(NilFloat)
August 23, 2020, 8:11am
#40
Send me a picture of your explorer, please.
Just a simple picture of the explorer?
@ArcticGamerTV I send the photo of my explorer.
NilFloat
(NilFloat)
August 23, 2020, 8:19am
#44
With open death screen GUI, please.
@ArcticGamerTV here is the photo of it
kylerzong
(kylerzong)
August 23, 2020, 8:24am
#46
DeathScreen.rbxl (20.5 KB)
Using the same script as my Original Post but with some tweens