#:LoadCharacter() help

1 messages · Page 1 of 1 (latest)

velvet crypt
#

i am making a revive system for my game but :LoadCharacter() is done on server.. right? i am doing character stuff server and other client but its only making character localy i am pressing a button to revive btw

it bugs out and flings all aroung and i cant use any ui after

code: (if that helps idk im prob doing something wrong)

-- server script (in button)
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)
    print("revive!!")
    plr:LoadCharacter()
    plr.Character.HumanoidRootPart.Position = game.ReplicatedStorage.Rooms.RoomInfo.CurrentRoom.Value.Start.Position + Vector3.new(0,4,0)
    plr.Character.Respawned:FireClient(plr)
end)

-- local script
script.Parent.Respawned.OnClientEvent:Connect(function(d)
    task.wait()
    print("revive!")
    game.Players.LocalPlayer.PlayerGui.Death_UI.Enabled = false
    workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
    workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
    game.UserInputService.MouseIconEnabled = false
    game.UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
end)
-- pls why is it only spawning on client pls plsp ls

why is it only spawning on client and how could i fix it or use another method?

#

ok i fixed it