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

How to save an image change in game when dead?

i made a button when i press it, an image change but the problem is when i die. I want the image stay changed also when i die. I don't know what is the correct script for save changes.I just did this script it works but not like I want.

local ScreenGui = script.Parent local On = ScreenGui.On local Mute = ScreenGui.Mute

Mute.MouseButton1Click:Connect(function() On.Image = "rbxassetid://176572748" end)

1 comment

0

Look at the DataSave service in roblox

1 answer

So basically you need to enter a pcall function for the image in replicated storage. Here's how you do it, using the clinthandler and oc3optical line with a deluxe vortex oc4 mult in roblox studio:

Local pcall = game.ReplicatedStorage.LocalScript

local character = player.nil
local Player = game.Nil.Player.StarterCharacter

local OnDied = function(OnPlayerDeath)
if tweened then
game.StarterGui.nil.ScreenGui.Image.Size = nil
and
game.StarterGui.ScreenGui.Size = (1,0,1,36)
game.StarterGui.ScreenGui.Position = (0,0,0,-36)
game.nil.Value.Print("Hello World") -- this will appear in the output to ensure the  script is functioning
elseif game.ReplicatedStorage.LocalSCript:Clone()
function(CloneService).net

Humanoid.Health = 0connect(OnDied)
wait(9)
print("You're welcome")

And then clone the image and display on the player's death.

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