Invisible Player

Like this?

local repStorage = game:GetService("ReplicatedStorage")
local players = game.Players:GetPlayers()

local respawnEvent = repStorage.RespawnEvent

-- game.Players.PlayerAdded:Connect(function(player)
--	player:LoadCharacter()
-- end)

respawnEvent.OnServerEvent:Connect(function(player)
	player:LoadCharacter()
end)

yes

unfortunarely, didn’t help. Maybe fully disable this script and turn on CharacterAutoLoads?

what?!??!! but you said that CharacterAutoLoads is turned on

i disabled it 10 mins ago because V_ladzed said, and then turned off when i changed respawn script

could you show the local script that fires the server to respawn the character

turn on CharacterAutoLoads and dont disable that script just keep PlayerAdded commented out (i kinda dont know when the client does respawnEvent:FireServer() therefore you should leave it there without disabling it)

Here is local script from DeathScreen Gui

local repStorage = game:GetService("ReplicatedStorage")
local tweenSer = game:GetService("TweenService")
local lightning = game:GetService("Lighting")
local players = game:GetService("Players")

local respawnEvent = repStorage.RespawnEvent

local plr = players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")

local blur = lightning.DeadBlur
local dcc = lightning.DeadCC

local main = script.Parent.Frame2
local middleframe = main.TestFrame
local respawnTime = main.TestFrame.RespawnLabel
local title = middleframe.TextLabel

respawnTime.TextTransparency = 1
title.TextTransparency = 1
middleframe.BackgroundTransparency = 1

middleframe.Size = UDim2.new(0, 0, 0, 162)
middleframe.Position = UDim2.new(.5, 0, 0.424, 0)

hum.Died:Connect(function()
	middleframe:TweenSizeAndPosition(UDim2.new(0, 1920, 0, 162), UDim2.new(0, 0, 0.424, 0))
	
	tweenSer:Create(middleframe, TweenInfo.new(1), {BackgroundTransparency = .4}):Play()
	tweenSer:Create(title, TweenInfo.new(1), {TextTransparency = 0}):Play()
	tweenSer:Create(respawnTime, TweenInfo.new(1), {TextTransparency = 0}):Play()
	
	tweenSer:Create(blur, TweenInfo.new(1), {Size = 20}):Play()
	tweenSer:Create(dcc, TweenInfo.new(1), {TintColor = Color3.fromRGB(162, 0, 0), Saturation = -1}):Play()
	
	respawnTime.Text = "Respawning in "..players.RespawnTime.." seconds"
	for i = 1, players.RespawnTime do
		respawnTime.Text = "Respawning in "..players.RespawnTime - i .." seconds"
		task.wait(1)
	end 
	middleframe:TweenSizeAndPosition(UDim2.new(0, 0, 0, 162), UDim2.new(.5, 0, 0.424, 0))

	tweenSer:Create(middleframe, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()
	tweenSer:Create(title, TweenInfo.new(1), {TextTransparency = 1}):Play()
	tweenSer:Create(respawnTime, TweenInfo.new(1), {TextTransparency = 1}):Play()

	tweenSer:Create(blur, TweenInfo.new(1), {Size = 0}):Play()
	tweenSer:Create(dcc, TweenInfo.new(1), {TintColor = Color3.fromRGB(255, 255, 255), Saturation = 0}):Play()
	task.wait(0.5)
	respawnEvent:FireServer()
end)

yeah if you have manual respawning script you better keep CharacterAutoLoads off but for now turn it on and disable all the scripts that are related to respawning in order to see whether the issue is with them

1 Like

i disabled the deathscreen gui script and it didn’t help. May this cause scripts with .Position or .CFrame?

might be a script that changes .CFrame or .Position because you can do something like this

Position = Vector3.new(0,9e9,0)
CFrame=CFrame.new(0,9e9,0)

this would make the part pretty much “disappear” but not really it just moves the part really far away

i can try to disable all scripts with .CFrame or .Position to check my theory

do that for sure it might fix the issue

Perhaps, all problem lies in teleports, because i disabled them, and rejoined, everything works fine

1 Like

@Bakonowychlopak123 @V_ladzec thank you guys for helping, i will rework teleports to fix problem.

yea in that case make sure you use CFrame instead of Position in teleports

I also recommend using Player.Character:PivotTo(CFrame.new()) to teleport players

also teleport players only on serverside just in case (i know position replicates from client to server but still me personally i rather to do that on serverside)

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.