My script isnt letting my player respawn?

heres my script, any help is appreciated

game.Players.PlayerAdded:Connect(function(player)
	local bool = Instance.new("BoolValue")
	bool.Name = "IsVR"
	bool.Parent = player.Character
	bool.Value = true
	local char = player.Character or player.CharacterAdded:Wait()
	local hum = char:WaitForChild("Humanoid")
	local userInputService = game:GetService("UserInputService")
	local isUsingVR = userInputService.VREnabled
	if (isUsingVR) then
		char.Parent = workspace.Players.VRPlayer
		print("VR Player!")
		player.RespawnLocation = workspace.VRPlayerSpawn
			if (isUsingVR) then
				
				char.HumanoidRootPart.Orientation = Vector3.new(0, 90, 0)
				char.Head.Mesh.MeshID = "https://assetdelivery.roblox.com/v1/asset/?id=9900352066"
			char.Head.Mesh.TextureID = "rbxassetid://9900377131"

		end
		
	else
		char.Parent = workspace.Players.NonVRPlayer
		print("Non VR Player")
		player.RespawnLocation = workspace.NonVRPlayerSpawn
		
	end
end)  

i got the issue fixed 30 letterssssssssssssss