Annoying Replicated storage to workspace issue

On studio my game death message area works just fine. but in Roblox it just shows complete black or white.

task.wait(1)

local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local lPlayer = Players.LocalPlayer
local Character = lPlayer.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Messages

Humanoid.Died:Connect(function()
	Humanoid.Parent:Destroy()
	for _, item in pairs(lPlayer.PlayerGui:GetChildren()) do
		if item:IsA("ScreenGui") and item.Name ~= "DeathScreen" then
			item.Enabled = false
		end
	end

	local Room = game.ReplicatedFirst.DeathScreen:Clone()
	Room.Parent = workspace
	Room.Name = "DeathScreen_" .. Character.Name
	

	local ClonedCharacter = ReplicatedStorage.Ghosts:FindFirstChild("Ghost" .. string.split(Character.Name, "_")[1])
	ClonedCharacter.Parent = Room
	script.Parent.Enabled = true
	ClonedCharacter.PrimaryPart.CFrame = Room.Character.CFrame
	workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
	workspace.CurrentCamera.CFrame = Room.Cam1.CFrame

	task.wait(2.5)
	TweenService:Create(workspace.CurrentCamera, TweenInfo.new(20), {CFrame = Room.Cam3.CFrame}):Play()

	if not Messages then
		Messages = {"That's odd...", "...I'm not sure how you died."}
	end

	table.insert(Messages, "You made it as far as Floor " .. workspace.CurrentFloor.Value .. ".")

	for _, text in pairs(Messages) do
		script.Parent.TextLabel.Text = text
		TweenService:Create(script.Parent.TextLabel, TweenInfo.new(2), {TextTransparency = 0}):Play()
		task.wait(6)
		TweenService:Create(script.Parent.TextLabel, TweenInfo.new(2), {TextTransparency = 1}):Play()
		task.wait(4)
	end

	task.wait(3)
	Room:Destroy()
	workspace.CurrentCamera.CameraType = Enum.CameraType.Orbital
end)

ReplicatedStorage.UpdateMessage.OnClientEvent:Connect(function(messages)
	Messages = messages
end)

I’ve tried everything I can, and I’m stuck

I also put a character in the room in question

Does no one have an answer? Am I just doomed to question forever??

I’m not sure if this is the issue but do you have StreamingEnabled turned on? If your working on a local script and need to access the workspace it could cause issues if the client doesn’t have the object loaded.

I have StreamingEnabled off. and it’s a localScript. How would I load objects for a client?

I fixed it, I put the room in ReplicatedStorage and turned StreamingEnabled Off.

1 Like